ZF-388: Instantiation Simplification
Description
Reduce the complexity of instantiation from:
require_once 'Zend/Config.php';
require_once 'Zend/Config/Ini.php';
$config = new Zend_Config(Zend_Config_Ini::load('/path/to/config.ini', 'staging'));
to:
require_once 'Zend/Config/Ini.php';
$config = new Zend_Config_Ini('/path/to/config.ini', 'staging');
Comments
Posted by Rob Allen (rob) on 2006-09-20T11:21:20.000+0000
Your proposed syntax would probably require deriving Zend_Config_Ini from Zend_Config to get all the common iteration, counting, __get etc code. During the original proposal process, it was decided that this was not desirable.
I would have thought that a syntax more like Zend_Db would be preferred for consistency?
i.e.
would be more in line with Zend_Db's system.
Posted by Darby Felton (darby) on 2006-09-20T11:38:22.000+0000
Indeed, I left the approach you mention above to be considered as a separate issue, since the two approaches need not be mutually exclusive.
The factory approach remains here for reference purposes; we may end up creating a JIRA issue for this, too.
I'll have some patches ready soon to help resolve this one; I want to coordinate with you on the development and nail down issues with respect to the next release. :)
Posted by Darby Felton (darby) on 2006-09-28T12:05:24.000+0000
Fixed with SVN revision 1100