diff --git a/src/Event/EventListener.php b/src/Event/EventListener.php index c56c2b9..7391f96 100644 --- a/src/Event/EventListener.php +++ b/src/Event/EventListener.php @@ -24,7 +24,7 @@ abstract class EventListener implements EventListenerInterface public function __construct(CakeEvent $event) { $this->event = $event; - $this->eventManager()->on($this); + $this->getEventManager()->on($this); } /** @@ -50,7 +50,7 @@ public function isType($type) { $template = sprintf('Bake/%s.ctp', $type); - return strpos($this->event->data[0], $template) !== false; + return strpos($this->event->getData('0'), $template) !== false; } /**