-- ghola <alex.far...@gmail.com> wrote
(on Thursday, 22 March 2012, 08:04 AM -0700):
> I don't see the need for Reflection. You can make a simple check to see if
> the 2 element array (passed in as a callback) has the first element as an
> instanceof Locator. If not, you just make the other checks that are
> currently made on the callback ... try to see if it is_callable, if it's
> string, array, etc.

You missed the point about also not wanting to make Locator a dependency
of the EventManager. It's not about having more dependencies -- it's
about location not being a concern of the EM; it's concerned with
aggregating listeners and notifying them when an event is triggered.

> I don't understand why you need to ensure that each EM gets a Locator. 

Because the CallbackHandler instances are created _inside_ the EM when
you call attach(). Thus, to get the Locator into the CallbackHandler, it
has to be in the EM first. 

-- 
Matthew Weier O'Phinney
Project Lead            | matt...@zend.com
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to