-- Mark Hage <[email protected]> wrote (on Thursday, 22 October 2009, 03:58 PM +0200): > Just found out the answer to my own question: > > In the Bootstrap I've created the function: > > protected function setconstants($constants){ > foreach ($constants as $key=>$value){ > if(!defined($key)){ > define($key, $value); > } > } > } > > and in the application.ini I can now do: > > constants._EXAMPLE_VAR = 'example'
:D It's always awesome to see people stumble upon the setter pattern we've defined in most new components, and then leverage it. Nicely done! > 2009/10/22 Mark Hage <[email protected]> > > Hi, > > Is it possible to define a constant in the application.ini and what is the > syntax? > > in php code I have define('_EXAMPLE_VAR', 'example value'); > But I would like to do this in the application.ini so I have all settings > in there. > is this possible like > _EXAMPLE_VAR = 'example value' > > ? > > Mark > > > -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
