/** * Set an event to use during dispatch * * By default, will re-cast to AdapterChainEvent if another event type is provided. * * @param Event $e * @return AdapterChain */ public function setEvent(Event $e) { if ($e instanceof Event && !$e instanceof AdapterChainEvent) { $eventParams = $e->getParams(); $e = new AdapterChainEvent(); $e->setParams($eventParams); unset($eventParams); } $this->event = $e; return $this; }