ZF-7419: Allow Bootstrap::getOption to return Zend_Config Object


Currently, almost every time I use the getOption() method in a Zend Application bootrap class, I have to wrap it in "new Zend_config()".

For example:

$Front->getRouter()->addConfig( new Zend_Config( $this->getOption( 'routes' ) ) );

It would be good to have the option to have the array automatically converted to a Zend_config object.

Change would need to be made to Zend_Application_Bootstrap_BootstrapAbstract::getOption()


The router is the only component where a Zend_Config object is required, which will be fixed with ZF 2.0.

Yes, any Zend component except router has a method such as setOptions($array) in addition to setConfig(Zend_Config).

This is because the bootstrap receives the options array from the application class on instantiation, and when you request options from the bootstrap class, you are receiving a merged version of options in an array format. i think its the standard to have the options in the array format for the application component.