From e5115003937d1920104d661a1cd9afb912e3297f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Pustu=C5=82ka?= Date: Fri, 21 Apr 2017 10:48:16 +0200 Subject: [PATCH] Use eventManager() where the interface is expected. --- src/Core/ObjectRegistry.php | 4 ++-- src/View/ViewVarsTrait.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/ObjectRegistry.php b/src/Core/ObjectRegistry.php index 7659a75b047..7a88770a0ba 100644 --- a/src/Core/ObjectRegistry.php +++ b/src/Core/ObjectRegistry.php @@ -290,7 +290,7 @@ public function set($objectName, $object) $this->unload($objectName); } if ($this instanceof EventDispatcherInterface && $object instanceof EventListenerInterface) { - $this->getEventManager()->on($object); + $this->eventManager()->on($object); } $this->_loaded[$name] = $object; } @@ -312,7 +312,7 @@ public function unload($objectName) $object = $this->_loaded[$objectName]; if ($this instanceof EventDispatcherInterface && $object instanceof EventListenerInterface) { - $this->getEventManager()->off($object); + $this->eventManager()->off($object); } unset($this->_loaded[$objectName]); } diff --git a/src/View/ViewVarsTrait.php b/src/View/ViewVarsTrait.php index c429f9baee8..864ac8da414 100644 --- a/src/View/ViewVarsTrait.php +++ b/src/View/ViewVarsTrait.php @@ -115,7 +115,7 @@ public function createView($viewClass = null) $this->viewVars, isset($this->request) ? $this->request : null, isset($this->response) ? $this->response : null, - $this instanceof EventDispatcherInterface ? $this->getEventManager() : null + $this instanceof EventDispatcherInterface ? $this->eventManager() : null ); }