Browse Source

Use eventManager() where the interface is expected.

Robert Pustułka 9 years ago
parent
commit
e511500393
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/Core/ObjectRegistry.php
  2. 1 1
      src/View/ViewVarsTrait.php

+ 2 - 2
src/Core/ObjectRegistry.php

@@ -290,7 +290,7 @@ abstract class ObjectRegistry
             $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 @@ abstract class ObjectRegistry
 
         $object = $this->_loaded[$objectName];
         if ($this instanceof EventDispatcherInterface && $object instanceof EventListenerInterface) {
-            $this->getEventManager()->off($object);
+            $this->eventManager()->off($object);
         }
         unset($this->_loaded[$objectName]);
     }

+ 1 - 1
src/View/ViewVarsTrait.php

@@ -115,7 +115,7 @@ trait ViewVarsTrait
             $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
         );
     }