This seems like it should be easy but I can’t figure it out. I just want to pass some contextual values to an event handler. I tried initiating CEvent as an object w/ my parameters in it, but that didn’t work:
$e = new CEvent( (object)array( 'class' => $this, 'user' => $user, 'amount' => $amount ) ); Yii::app()->myController->onPurchase($e);
If I create the CEvent with simply ‘$this’ as an argument to the contructor, it works as expected. When I try the above, the event handler never gets called. No errors in the various logs either.