Skip to content

Commit

Permalink
Use eventManager() where the interface is expected.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Pustułka committed Apr 21, 2017
1 parent 2172466 commit e511500
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Core/ObjectRegistry.php
Expand Up @@ -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;
}
Expand All @@ -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]);
}
Expand Down
2 changes: 1 addition & 1 deletion src/View/ViewVarsTrait.php
Expand Up @@ -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
);
}

Expand Down

0 comments on commit e511500

Please sign in to comment.