RequestContext $context:
RequestMatcherInterface|UrlMatcherInterface $matcher:
UrlGeneratorInterface $generator:
string $uriFilterRegexp:
public function __construct(RequestContext $context, $matcher, UrlGeneratorInterface $generator, $uriFilterRegexp = '') {
$this->context = $context;
if (!$matcher instanceof RequestMatcherInterface && !$matcher instanceof UrlMatcherInterface) {
throw new \InvalidArgumentException('Invalid $matcher');
}
$this->matcher = $matcher;
$this->generator = $generator;
$this->uriFilterRegexp = $uriFilterRegexp;
$this->generator
->setContext($context);
}