public function Router::__construct

Constructor.

Parameters

LoaderInterface $loader A LoaderInterface instance:

mixed $resource The main resource to load:

array $options An array of options:

RequestContext $context The context:

LoggerInterface $logger A logger instance:

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Router.php, line 45

Class

Router
The Router class is an example of the integration of all pieces of the routing system for easier use.

Namespace

Symfony\Component\Routing

Code

public function __construct(LoaderInterface $loader, $resource, array $options = array(), RequestContext $context = null, LoggerInterface $logger = null) {
  $this->loader = $loader;
  $this->resource = $resource;
  $this->logger = $logger;
  $this->context = null === $context ? new RequestContext() : $context;
  $this
    ->setOptions($options);
}