offset* are the names used for overloading OO syntax. So $obj->prop,
$obj->prop = 5 and isset($obj->prop) should all work nicely.
Don't you prefer that syntax?

Andi 

> -----Original Message-----
> From: Matthew Ratzloff [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, December 20, 2006 3:34 PM
> To: [email protected]; [EMAIL PROTECTED]
> Subject: Re: [fw-general] Zend_Registry needs its set() and 
> has() methods back
> 
> Gavin,
> 
> Thanks for the updated documentation.  I gotta say, though, 
> that offsetSet(), offsetGet(), and offsetExists() aren't 
> nearly as intuitive and easy to remember as the standard 
> set(), get(), and has() methods of a container object.  FWIW, 
> I think they're poorly named in the SPL class to begin with.  
> For a registry, it seems to me that those names reflect an 
> implementation detail not inherent in the nature of the class.
> 
> If necessary, I can subclass--just seems like a lot of people 
> in my situation might be wondering the same thing.
> 
> Thanks!
> 
> -Matt
> 
> > 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
> 

Reply via email to