Thanks Matthew for raising this issue. I've made a couple changes, and
improved the documentation:
http://framework.zend.com/wiki/x/Wy8
http://framework.zend.com/wiki/pages/pageinfo.action?pageId=12124
I believe the new code examples show how to pass around a registry
object explicitly,
and then set, get, and test for membership. As always, I am grateful
for your attention
to detail, since it helps us all create a more professional framework :)
Also the new Zend::initRegistry() method enables developers to subclass
Zend_Registry,
and add alias methods for offsetGet() and offsetExists(), such as has(),
get(), set(), etc.,
by creating an instance of the subclass in bootstrap code, and then
supplying that instance
to initRegistry(), before any other registry-related methods are used.
Cheers,
Gavin
Matthew Ratzloff wrote:
Was it an oversight that Zend_Registry lost its set() and has() methods
when it was refactored to extend ArrayObject, despite still having a
corresponding get() method? I don't know about everyone else, but I
prefer to pass around a registry object explicitly rather than rely on the
static Zend::register()/isRegistered() methods. I would really like these
methods back.
I've filed an issue here:
http://framework.zend.com/issues/browse/ZF-672
Thanks,
-Matt