merged branch stof/change_typehint (PR #4569)

Commits
-------

92e028f Changed the typehint in the LocaleListener

Discussion
----------

Changed the typehint in the LocaleListener

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.

---------------------------------------------------------------------------

by travisbot at 2012-06-13T14:12:10Z

This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611055) (merged 92e028f1 into 1d7501db).
This commit is contained in:
Fabien Potencier 2012-06-13 16:13:52 +02:00
commit 6baa2b19c4

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\HttpKernel\EventListener;
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;
/**
@ -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;