Gavin Vess wrote:
> Zend_Config was altered to work the same as Zend_Db, accepting a string
> and then an $options array, or direct instantiation of the adapters. I
> much prefer the latter myself, as both simpler and supporting code
> completion.
Zend_Config doesn't have a factory() method like Zend_DB. I did talk
about it on the mailing list as a possible way to simplify instantiation.
However, a better solution to the simplified creation goal was
implemented by Darby (ZF-388). What has changed to Zend_Config is that
instead of having to instantiate your own Zend_Config as well as the
adapter, you just instantiate the adapter and get a Zend_Config back.
i.e.
$config = new Zend_Config(new Zend_Config_Ini($file, $section));
is now
$config = new Zend_Config_Ini($file, $section);
I too prefer the direct instantiation model unless there's a clear
advantage to a factory.
Regards,
Rob...