Symfony\Component\Security\Http\HttpUtils::__construct PHP Method

__construct() public method

Constructor.
public __construct ( Symfony\Component\Routing\RouterInterface $router = null )
$router Symfony\Component\Routing\RouterInterface An RouterInterface instance
    public function __construct(RouterInterface $router = null)
    {
        $this->router = $router;
    }

Usage Example

 /**
  * Constructor.
  *
  * @param UrlGeneratorInterface                       $urlGenerator A UrlGeneratorInterface instance
  * @param UrlMatcherInterface|RequestMatcherInterface $urlMatcher   The URL or Request matcher
  *
  * @throws \InvalidArgumentException
  */
 public function __construct(UrlGeneratorInterface $urlGenerator = null, $urlMatcher = null)
 {
     parent::__construct($urlGenerator, $urlMatcher);
     $this->urlMatcher = $urlMatcher;
 }