Rob Allen-3 wrote:
In you Bootstrap class (the one that extends
Zend_Application_Bootstrap_Bootstrap), add this method:
protected function _initConfig()
{
$options = $this-getOptions();
$config = new Zend_Config($options);
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();
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'];
Hi Jurian,
Yeah, that's what I was afraid of :).
It's just that I used not to have to worry about calling stuff like this:
?php echo Zend_Registry::get('config')-app-name; ?
This would just echo null if it wasn't set.
With arrays I need to check for an existing index on every call.
?php
If your pulling the values from the config and you know they exist,
you don't need to check, unless there dynamic?
http://www.webdesign-n
On 22 Nov 2009, at 22:34, JoostV jo...@accentinteractive.nl wrote:
Hi Jurian,
Yeah, that's what I was afraid of :).
It's just that I used not to have
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