[Flow] Own Constant into YAML Configuration
Bastian Waidelich
bastian at typo3.org
Fri Apr 11 12:42:19 CEST 2014
Peter Russ wrote:
> What is the recommended approach to get environment parameters into the
> YAML configuration to be used like a FLOW constant?
Not sure whether I got your question right..
With the %<CONSTANT>% syntax you can refer to PHP constants from within
your settings (see [1]).
You can't set PHP Constants from the "outside" AFAIK. You *could*
however use the "auto_prepend_file" directive [2] to include a file that
sets the constant, but that seems a bit hacky to me.
As to *environment variables*: You can't *set* those via the settings,
but for instance through a "SetEnv" option for apache:
SetEnv SOME_CONSTANT SomeValue
You can't access those in the settings though..
Could you elaborate on what you're trying to achieve?
[1]
http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartIII/Configuration.html#constants
[2] http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file
--
Bastian Waidelich
More information about the Flow
mailing list