Matthew Weier O'Phinney wrote:
Actually, there *is* stuff you can do with Zend_Registry by extending
it, such as lazy-loading and instantiating classes, etc. As an
example,
I've seen people add these later capabilities to get(), so that you
don't even need to instantiate the object and push it to the registry:
$view = My_Registry::get('Zend_View'); // instantiates and loads
on demand
This would simply not be possible with globals.
True, we don't offer it in ZF by default, but Zend_Registry provides
an
interface that you can extend to offer this functionality.
If lazy-loading is now a common use-case my suggestion <http://framework.zend.com/issues/browse/ZF-1378
> could be added to Zend_Registry.
nico