Event Target Names

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Event Target Names

Gregory
Would even using interface names complicate version dependency between
modules, especially those not by the same author?



--
Greg
Reply | Threaded
Open this post in threaded view
|

Re: Event Target Names

weierophinney
Administrator
-- Greg <[hidden email]> wrote
(on Sunday, 24 June 2012, 12:24 AM -0500):
> Would even using interface names complicate version dependency between
> modules, especially those not by the same author?

Can you clarify your question, please? I don't understand what you're
asking at all from this -- are you asking if interface names should be
used as event contexts?

--
Matthew Weier O'Phinney
Project Lead            | [hidden email]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
Reply | Threaded
Open this post in threaded view
|

Re: Event Target Names

Gregory
> Can you clarify your question, please? I don't understand what you're
> asking at all from this -- are you asking if interface names should be
> used as event contexts?

I'm not sure now either.

I don't think this is related, but to test what I was originally
thinking about, I copied Zend/Mvc/RouteListener to
Application/Mvc/RouteListener and then added the following to the main
application.config.php

        'services'     => array(
            'RouteListener'    => 'Application\Mvc\RouteListener',
        ),


Nothing else was changed, but now the routes won't match. They do if I change

$this->listeners[] = $events->attach('route', array($this, 'onRoute'));

to

$this->listeners[] = $events->attach('route',
array(get_parent_class($this), 'onRoute'));


Is there another aspect at work here? And if its not because of the
config change above, could you tell me which file and line it was
failing in?
Reply | Threaded
Open this post in threaded view
|

Re: Event Target Names

Gregory
nm, it was looking in the current namespace for if (!$routeMatch
instanceof Router\RouteMatch) {



On Fri, Jun 29, 2012 at 11:49 AM, Greg <[hidden email]> wrote:

>> Can you clarify your question, please? I don't understand what you're
>> asking at all from this -- are you asking if interface names should be
>> used as event contexts?
>
> I'm not sure now either.
>
> I don't think this is related, but to test what I was originally
> thinking about, I copied Zend/Mvc/RouteListener to
> Application/Mvc/RouteListener and then added the following to the main
> application.config.php
>
>        'services'     => array(
>            'RouteListener'    => 'Application\Mvc\RouteListener',
>        ),
>
>
> Nothing else was changed, but now the routes won't match. They do if I change
>
> $this->listeners[] = $events->attach('route', array($this, 'onRoute'));
>
> to
>
> $this->listeners[] = $events->attach('route',
> array(get_parent_class($this), 'onRoute'));
>
>
> Is there another aspect at work here? And if its not because of the
> config change above, could you tell me which file and line it was
> failing in?



--
Greg