Hi Joost, To help you the best: try to stick with arrays. Internally the array is used so converting it to an object causes only overhead.
To give the answer: you could just convert the thing by type casting it. Inside your methods: $options = $this->getOptions(); $var = $options['var']; $options = (object) $options; $var = $options->var; The array will be converted into a StdClass. Regards, Jurian -- Jurian Sluiman CTO Soflomo V.O.F. http://soflomo.com On Sunday 22 Nov 2009 23:11:51 JoostV wrote: > Totally new to Zend_Application, please forgive me for asking noob question > like this. > > When I instantiate a new application using Zend_Application I pass a > config.ini file. I can accass the settings from this config file as an > array, in Zend_Application_Bootstrap, using $this->getOptions(); > > However, I would like to access these settings as an object, as I'm used to > from the 'old' $config = new Zend_Config_Ini('../application/config.ini', > APPLICATION_ENV); method. How can I do this? > > <?php > // In application.php > $application = new Zend_Application( > APPLICATION_ENV, > APPLICATION_PATH . '/configs/config.ini' > ); > > // In Bootstrap.php: > Zend_Registry::set('config', $this->getOptions()); >
