[Flow] Own Constant into YAML Configuration
Peter Russ
peter.russ at 4many.net
Tue May 6 23:10:27 CEST 2014
--- Original Nachricht ---
Absender: Peter Russ
Datum: 18.04.2014 17:29:
> --- Original Nachricht ---
> Absender: Bastian Waidelich
> Datum: 11.04.2014 12:42:
>> 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
>>
>
> Thanks for that links but they are known ;-)
> We need the constants on command line and nginx. Autoprepend is not an
> option.
> The only way we found was to patch index.php and flow.php to define and
> add that to make it available for YAML parsing.
>
> It would be pretty helpful if we could define allowed environment
> constants to be included into FLOW.
>
> e.g.
> FLOW_ADDITINAL_CONSTANTS=MY_CONSTANTS_1,APPLICATION_VALUE_2,..
>
> I will prepare a CR...
>
> Peter.
http://forge.typo3.org/issues/58579
Can't push to master because of missing CLA :-(
Peter.
--
Fiat lux! Docendo discimus.
_____________________________
http://www.xing.com/profile/Peter_Russ
More information about the Flow
mailing list