Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Application
-
Labels:None
Description
I believe it would be more useful if the config options from an ini file (if specified in the 'config' option) were overwritten by any configuration options supplied as part of the options array in the Zend_Application constructor (i.e. array('resources' => array('option' => 'value'))).
I think the function setOptions(array $options) on line 117 of Zend/Application.php should be altered. Changing it from:
$options = $this->mergeOptions($options, $this->_loadConfig($options['config']));
to:
$options = $this->mergeOptions($this->_loadConfig($options['config']), $options);
I believe the case is stronger to overwrite ini data via the constructor call than it would be in reverse.
Using the following code:
application.ini:
resources.frontController.defaultModule = "content"index.php:
$application = new Zend_Application(APPLICATION_ENV, array(
'config' => ROOT_PATH . 'application/config/bootstrap/application.ini',
'resources' => array(
'frontController' => array(
'defaultModule' => 'admin'
)
)
));
Causes the defaultModule to be content. I would like the outcome to make the defaultModule admin as specified in the array and not the ini file.
This appears to have been done in 1.8.2 sorry for not finding the original bug report.