Skip to content

Commit

Permalink
Downgrade Application to EventsCapableInterface
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksei Khudiakov <[email protected]>
  • Loading branch information
Xerkus committed Aug 20, 2022
1 parent 4dfb4e2 commit f3338f2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit f3338f2

Please sign in to comment.