diff --git a/src/mibew/libs/classes/Mibew/Controller/ControllerResolver.php b/src/mibew/libs/classes/Mibew/Controller/ControllerResolver.php index 1de3ff9b..415f8390 100644 --- a/src/mibew/libs/classes/Mibew/Controller/ControllerResolver.php +++ b/src/mibew/libs/classes/Mibew/Controller/ControllerResolver.php @@ -23,7 +23,7 @@ use Mibew\Routing\RouterAwareInterface; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\HttpFoundation\Request; -class ControllerResolver implements RouterAwareInterface +class ControllerResolver implements RouterAwareInterface, AuthenticationManagerAwareInterface { /** * @var RouterInterface|null @@ -64,6 +64,22 @@ class ControllerResolver implements RouterAwareInterface $this->router = $router; } + /** + * {@inheritdoc} + */ + public function getAuthenticationManager() + { + return $this->authenticationManager; + } + + /** + * {@inheritdoc} + */ + public function setAuthenticationManager(AuthenticationManagerInterface $manager) + { + $this->authenticationManager = $manager; + } + /** * Resolves controller by request. * @@ -122,7 +138,7 @@ class ControllerResolver implements RouterAwareInterface } if ($object instanceof AuthenticationManagerAwareInterface) { - $object->setAuthenticationManager($this->authenticationManager); + $object->setAuthenticationManager($this->getAuthenticationManager()); } return array($object, $method);