3 use Symfony\Component\Routing\Exception\MethodNotAllowedException;
4 use Symfony\Component\Routing\Exception\ResourceNotFoundException;
5 use Symfony\Component\Routing\RequestContext;
8 * This class has been auto-generated
9 * by the Symfony Routing Component.
11 class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
13 public function __construct(RequestContext $context)
15 $this->context = $context;
18 public function match($rawPathinfo)
21 $pathinfo = rawurldecode($rawPathinfo);
22 $trimmedPathinfo = rtrim($pathinfo, '/');
23 $context = $this->context;
24 $request = $this->request ?: $this->createRequest($pathinfo);
25 $requestMethod = $canonicalMethod = $context->getMethod();
27 if ('HEAD' === $requestMethod) {
28 $canonicalMethod = 'GET';
31 if (0 === strpos($pathinfo, '/rootprefix')) {
33 if ('/rootprefix/test' === $pathinfo) {
34 return array('_route' => 'static');
38 if (preg_match('#^/rootprefix/(?P<var>[^/]++)$#sD', $pathinfo, $matches)) {
39 return $this->mergeDefaults(array_replace($matches, array('_route' => 'dynamic')), array ());
45 if ('/with-condition' === $pathinfo && ($context->getMethod() == "GET")) {
46 return array('_route' => 'with-condition');
49 if ('/' === $pathinfo && !$allow) {
50 throw new Symfony\Component\Routing\Exception\NoConfigurationException();
53 throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();