public function DynamicRouter::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony-cmf/routing/DynamicRouter.php \Symfony\Cmf\Component\Routing\DynamicRouter::__construct()
Parameters
RequestContext $context:
RequestMatcherInterface|UrlMatcherInterface $matcher:
UrlGeneratorInterface $generator:
string $uriFilterRegexp:
EventDispatcherInterface|null $eventDispatcher:
RouteProviderInterface $provider:
File
- vendor/
symfony-cmf/ routing/ DynamicRouter.php, line 91
Class
- DynamicRouter
- A flexible router accepting matcher and generator through injection and using the RouteEnhancer concept to generate additional data on the routes.
Namespace
Symfony\Cmf\Component\RoutingCode
public function __construct(RequestContext $context, $matcher, UrlGeneratorInterface $generator, $uriFilterRegexp = '', EventDispatcherInterface $eventDispatcher = null, RouteProviderInterface $provider = null) {
$this->context = $context;
if (!$matcher instanceof RequestMatcherInterface && !$matcher instanceof UrlMatcherInterface) {
throw new \InvalidArgumentException('Matcher must implement either Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface or Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface');
}
$this->matcher = $matcher;
$this->generator = $generator;
$this->eventDispatcher = $eventDispatcher;
$this->uriFilterRegexp = $uriFilterRegexp;
$this->provider = $provider;
$this->generator
->setContext($context);
}