/** * @param ActionEventDispatcher $dispatcher */ public function attach(ActionEventDispatcher $dispatcher) { //Used within the test: //DoctrineTableGatewayTest::it_filters_users_by_a_between_filter_set_by_an_action_event_listener $this->trackHandler($dispatcher->attachListener('collect_result_set', [$this, 'onCollectResultSet'])); $this->trackHandler($dispatcher->attachListener('count_rows', [$this, 'onCountRows'])); //Used within the test: //DoctrineTableGatewayTest::it_does_not_perform_the_delete_query_when_no_listener_adds_a_condition $this->trackHandler($dispatcher->attachListener('delete_table_row', [$this, 'onDeleteTableRow'])); self::$isAttached = true; }
/** * @param ActionEventDispatcher $events * * @return void */ public function attach(ActionEventDispatcher $events) { $this->trackHandler($events->attachListener(MessageDispatch::INITIALIZE, $this)); }
/** * @param ActionEventDispatcher $events * * @return void */ public function attach(ActionEventDispatcher $events) { $this->trackHandler($events->attachListener(MessageDispatch::INITIALIZE, [$this, 'onInitializeMessageDispatch'])); $this->trackHandler($events->attachListener(MessageDispatch::FINALIZE, [$this, 'onFinalizeMessageDispatch'])); }
/** * Attach to CommandBus or EventBus route event * * @param ActionEventDispatcher $events * * @return void */ public function attach(ActionEventDispatcher $events) { $this->trackHandler($events->attachListener(MessageDispatch::ROUTE, array($this, 'onRouteMessage'), 100)); }