I have a preHydrate listener that has similar functionality across several tables. I've attached it to the tables, but some functionality needs to know which table it is actually working on.
The $event->getInvoker() method doesn't return anything. Does anyone have any other suggestions to determine to which class the invoker is attached?
Hmm. It doesn't look like the event is setting an invoker. I am not sure if it should behave this way or not, can you create a ticket?
Thanks, Jon
On Wed, Jun 4, 2008 at 11:47 AM, Dan Wilson <killroy...@gmail.com> wrote:
> I have a preHydrate listener that has similar functionality across > several tables. I've attached it to the tables, but some > functionality needs to know which table it is actually working on.
> The $event->getInvoker() method doesn't return anything. Does anyone > have any other suggestions to determine to which class the invoker is > attached?
I actually found a way around it. I simply created a constructor in the listener and passed in the invoker table name. This worked just fine for me, but might not be the best solution for others.
I did some investigation and it appears that someone else created a ticket on this, but for a different purpose. Once they figured out they could get the data from $event, they closed the ticket as invalid. This ticket could be re-opened if you feel $event should be able to tell you the invoker.
On Fri, Jun 6, 2008 at 8:36 AM, Jonathan Wage <jonw...@gmail.com> wrote: > Hmm. It doesn't look like the event is setting an invoker. I am not sure if > it should behave this way or not, can you create a ticket?
> Thanks, Jon
> On Wed, Jun 4, 2008 at 11:47 AM, Dan Wilson <killroy...@gmail.com> wrote:
>> I have a preHydrate listener that has similar functionality across >> several tables. I've attached it to the tables, but some >> functionality needs to know which table it is actually working on.
>> The $event->getInvoker() method doesn't return anything. Does anyone >> have any other suggestions to determine to which class the invoker is >> attached?
On Fri, Jun 6, 2008 at 11:03 AM, Dan Wilson <killroy...@gmail.com> wrote:
> I actually found a way around it. I simply created a constructor in > the listener and passed in the invoker table name. This worked just > fine for me, but might not be the best solution for others.
> I did some investigation and it appears that someone else created a > ticket on this, but for a different purpose. Once they figured out > they could get the data from $event, they closed the ticket as > invalid. This ticket could be re-opened if you feel $event should be > able to tell you the invoker.
> On Fri, Jun 6, 2008 at 8:36 AM, Jonathan Wage <jonw...@gmail.com> wrote: > > Hmm. It doesn't look like the event is setting an invoker. I am not sure > if > > it should behave this way or not, can you create a ticket?
> > Thanks, Jon
> > On Wed, Jun 4, 2008 at 11:47 AM, Dan Wilson <killroy...@gmail.com> > wrote:
> >> I have a preHydrate listener that has similar functionality across > >> several tables. I've attached it to the tables, but some > >> functionality needs to know which table it is actually working on.
> >> The $event->getInvoker() method doesn't return anything. Does anyone > >> have any other suggestions to determine to which class the invoker is > >> attached?
On Fri, Jun 6, 2008 at 11:55 AM, Jonathan Wage <jonw...@gmail.com> wrote: > I think possibly an invoker should be set. Not sure what the invoker should > be though. Can you create a ticket?
> - Jon
> On Fri, Jun 6, 2008 at 11:03 AM, Dan Wilson <killroy...@gmail.com> wrote:
>> I actually found a way around it. I simply created a constructor in >> the listener and passed in the invoker table name. This worked just >> fine for me, but might not be the best solution for others.
>> I did some investigation and it appears that someone else created a >> ticket on this, but for a different purpose. Once they figured out >> they could get the data from $event, they closed the ticket as >> invalid. This ticket could be re-opened if you feel $event should be >> able to tell you the invoker.
>> On Fri, Jun 6, 2008 at 8:36 AM, Jonathan Wage <jonw...@gmail.com> wrote: >> > Hmm. It doesn't look like the event is setting an invoker. I am not sure >> > if >> > it should behave this way or not, can you create a ticket?
>> > Thanks, Jon
>> > On Wed, Jun 4, 2008 at 11:47 AM, Dan Wilson <killroy...@gmail.com> >> > wrote:
>> >> I have a preHydrate listener that has similar functionality across >> >> several tables. I've attached it to the tables, but some >> >> functionality needs to know which table it is actually working on.
>> >> The $event->getInvoker() method doesn't return anything. Does anyone >> >> have any other suggestions to determine to which class the invoker is >> >> attached?