diff --git a/src/Application.php b/src/Application.php index 81b9699d..d94a9818 100644 --- a/src/Application.php +++ b/src/Application.php @@ -4,8 +4,8 @@ namespace Laminas\Mvc; -use Laminas\EventManager\EventManagerAwareInterface; use Laminas\EventManager\EventManagerInterface; +use Laminas\EventManager\EventsCapableInterface; use Laminas\ServiceManager\ServiceManager; use Laminas\Stdlib\RequestInterface; use Laminas\Stdlib\ResponseInterface; @@ -39,8 +39,7 @@ * if you wish to setup your own listeners and/or workflow; alternately, you * can simply extend the class to override such behavior. */ -class Application implements - EventManagerAwareInterface +class Application implements EventsCapableInterface { public const ERROR_CONTROLLER_CANNOT_DISPATCH = 'error-controller-cannot-dispatch'; public const ERROR_CONTROLLER_NOT_FOUND = 'error-controller-not-found'; @@ -180,24 +179,19 @@ public function getMvcEvent() /** * Set the event manager instance - * - * @return Application */ - public function setEventManager(EventManagerInterface $eventManager) + protected function setEventManager(EventManagerInterface $eventManager): void { $eventManager->setIdentifiers([ self::class, static::class, ]); $this->events = $eventManager; - return $this; } /** * Retrieve the event manager * - * Lazy-loads an EventManager instance if none registered. - * * @return EventManagerInterface */ public function getEventManager()