From 2ab669ba3a03af50200591f8affa8ea45ac5e445 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 4 Jul 2014 12:04:51 +0000 Subject: [PATCH] Use "RouterInterface" instead of "Router" in "RouterAwareInterface" --- src/mibew/libs/classes/Mibew/Application.php | 10 +++++----- .../classes/Mibew/Routing/RouterAwareInterface.php | 8 +++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/mibew/libs/classes/Mibew/Application.php b/src/mibew/libs/classes/Mibew/Application.php index 7f5b4dc3..0b12ea6c 100644 --- a/src/mibew/libs/classes/Mibew/Application.php +++ b/src/mibew/libs/classes/Mibew/Application.php @@ -26,13 +26,13 @@ use Mibew\Http\Exception\AccessDeniedException as AccessDeniedHttpException; use Mibew\Http\Exception\HttpException; use Mibew\Http\Exception\MethodNotAllowedException as MethodNotAllowedHttpException; use Mibew\Http\Exception\NotFoundException as NotFoundHttpException; -use Mibew\Routing\Router; use Mibew\Routing\RouterAwareInterface; use Mibew\Routing\Exception\AccessDeniedException as AccessDeniedRoutingException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Routing\RequestContext; +use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Routing\Exception\MethodNotAllowedException as MethodNotAllowedRoutingException; use Symfony\Component\Routing\Exception\ResourceNotFoundException as ResourceNotFoundRoutingException; @@ -42,7 +42,7 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException as ResourceNot class Application implements RouterAwareInterface { /** - * @var Router|null + * @var RouterInterface|null */ protected $router = null; @@ -64,9 +64,9 @@ class Application implements RouterAwareInterface /** * Class constructor. * - * @param Router $router Appropriate router instance. + * @param RouterInterface $router Appropriate router instance. */ - public function __construct(Router $router) + public function __construct(RouterInterface $router) { $this->router = $router; $this->authenticationManager = new AuthenticationManager(); @@ -150,7 +150,7 @@ class Application implements RouterAwareInterface /** * {@inheritdoc} */ - public function setRouter(Router $router) + public function setRouter(RouterInterface $router) { $this->router = $router; } diff --git a/src/mibew/libs/classes/Mibew/Routing/RouterAwareInterface.php b/src/mibew/libs/classes/Mibew/Routing/RouterAwareInterface.php index 1fed2da4..1695e546 100644 --- a/src/mibew/libs/classes/Mibew/Routing/RouterAwareInterface.php +++ b/src/mibew/libs/classes/Mibew/Routing/RouterAwareInterface.php @@ -17,6 +17,8 @@ namespace Mibew\Routing; +use Symfony\Component\Routing\RouterInterface; + /** * An interface for all router aware objects. */ @@ -25,14 +27,14 @@ interface RouterAwareInterface /** * Sets associated router object. * - * @param Router $router A router instance. + * @param RouterInterface $router A router instance. */ - public function setRouter(Router $router); + public function setRouter(RouterInterface $router); /** * Gets associated router object. * - * @return Router A router instance; + * @return RouterInterface A router instance; */ public function getRouter(); }