Skip to content

Commit

Permalink
Changed the typehint in the LocaleListener
Browse files Browse the repository at this point in the history
The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.
  • Loading branch information
stof committed Jun 13, 2012
1 parent 3ab9a6e commit 92e028f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Routing\RequestContextAwareInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
Expand All @@ -26,7 +26,7 @@ class LocaleListener implements EventSubscriberInterface
private $router;
private $defaultLocale;

public function __construct($defaultLocale = 'en', RouterInterface $router = null)
public function __construct($defaultLocale = 'en', RequestContextAwareInterface $router = null)
{
$this->defaultLocale = $defaultLocale;
$this->router = $router;
Expand Down

0 comments on commit 92e028f

Please sign in to comment.