public function utilize(ListenerAggregateInterface $plugin) { $plugin->attach($this->getEventManager()); return $this; }
/** * Attach a listener aggregate * * Listener aggregates accept an EventManagerInterface instance, and call attach() * one or more times, typically to attach to multiple events using local * methods. * * @param ListenerAggregateInterface $aggregate * @param int $priority If provided, a suggested priority for the aggregate to use * @return mixed return value of {@link ListenerAggregateInterface::attach()} */ public function attachAggregate(ListenerAggregateInterface $aggregate, $priority = 1) { return $aggregate->attach($this, $priority); }
/** * * @param ListenerAggregateInterface $listener */ public function attach(ListenerAggregateInterface $listener) { $listener->attach($this->eventManager); }