var/cache/dev/srcDevDebugProjectContainerUrlMatcher.php line165

Open in your IDE?
  1. <?php
  2. use Symfony\Component\Routing\Exception\MethodNotAllowedException;
  3. use Symfony\Component\Routing\Exception\ResourceNotFoundException;
  4. use Symfony\Component\Routing\RequestContext;
  5. /**
  6.  * This class has been auto-generated
  7.  * by the Symfony Routing Component.
  8.  */
  9. class srcDevDebugProjectContainerUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
  10. {
  11.     public function __construct(RequestContext $context)
  12.     {
  13.         $this->context $context;
  14.     }
  15.     public function match($rawPathinfo)
  16.     {
  17.         $allow = [];
  18.         $pathinfo rawurldecode($rawPathinfo);
  19.         $trimmedPathinfo rtrim($pathinfo'/');
  20.         $context $this->context;
  21.         $request $this->request ?: $this->createRequest($pathinfo);
  22.         $requestMethod $canonicalMethod $context->getMethod();
  23.         if ('HEAD' === $requestMethod) {
  24.             $canonicalMethod 'GET';
  25.         }
  26.         if (=== strpos($pathinfo'/default')) {
  27.             // default_index
  28.             if ('/default/index' === $pathinfo) {
  29.                 return array (  '_controller' => 'App\\Controller\\DefaultController::index',  '_route' => 'default_index',);
  30.             }
  31.             // default_product
  32.             if ('/default/product' === $pathinfo) {
  33.                 return array (  '_controller' => 'App\\Controller\\DefaultController::product',  '_route' => 'default_product',);
  34.             }
  35.             // default_tax
  36.             if ('/default/tax' === $pathinfo) {
  37.                 return array (  '_controller' => 'App\\Controller\\DefaultController::tax',  '_route' => 'default_tax',);
  38.             }
  39.         }
  40.         elseif (=== strpos($pathinfo'/admin')) {
  41.             // easyadmin
  42.             if ('/admin' === $trimmedPathinfo) {
  43.                 $ret = array (  '_controller' => 'EasyCorp\\Bundle\\EasyAdminBundle\\Controller\\AdminController::indexAction',  '_route' => 'easyadmin',);
  44.                 if ('/' === substr($pathinfo, -1)) {
  45.                     // no-op
  46.                 } elseif ('GET' !== $canonicalMethod) {
  47.                     goto not_easyadmin;
  48.                 } else {
  49.                     return array_replace($ret$this->redirect($rawPathinfo.'/''easyadmin'));
  50.                 }
  51.                 return $ret;
  52.             }
  53.             not_easyadmin:
  54.             // admin
  55.             if ('/admin' === $trimmedPathinfo) {
  56.                 $ret = array (  '_controller' => 'EasyCorp\\Bundle\\EasyAdminBundle\\Controller\\AdminController::indexAction',  '_route' => 'admin',);
  57.                 if ('/' === substr($pathinfo, -1)) {
  58.                     // no-op
  59.                 } elseif ('GET' !== $canonicalMethod) {
  60.                     goto not_admin;
  61.                 } else {
  62.                     return array_replace($ret$this->redirect($rawPathinfo.'/''admin'));
  63.                 }
  64.                 return $ret;
  65.             }
  66.             not_admin:
  67.         }
  68.         elseif (=== strpos($pathinfo'/_')) {
  69.             // _twig_error_test
  70.             if (=== strpos($pathinfo'/_error') && preg_match('#^/_error/(?P<code>\\d+)(?:\\.(?P<_format>[^/]++))?$#sD'$pathinfo$matches)) {
  71.                 return $this->mergeDefaults(array_replace($matches, ['_route' => '_twig_error_test']), array (  '_controller' => 'twig.controller.preview_error:previewErrorPageAction',  '_format' => 'html',));
  72.             }
  73.             // _wdt
  74.             if (=== strpos($pathinfo'/_wdt') && preg_match('#^/_wdt/(?P<token>[^/]++)$#sD'$pathinfo$matches)) {
  75.                 return $this->mergeDefaults(array_replace($matches, ['_route' => '_wdt']), array (  '_controller' => 'web_profiler.controller.profiler:toolbarAction',));
  76.             }
  77.             if (=== strpos($pathinfo'/_profiler')) {
  78.                 // _profiler_home
  79.                 if ('/_profiler' === $trimmedPathinfo) {
  80.                     $ret = array (  '_controller' => 'web_profiler.controller.profiler:homeAction',  '_route' => '_profiler_home',);
  81.                     if ('/' === substr($pathinfo, -1)) {
  82.                         // no-op
  83.                     } elseif ('GET' !== $canonicalMethod) {
  84.                         goto not__profiler_home;
  85.                     } else {
  86.                         return array_replace($ret$this->redirect($rawPathinfo.'/''_profiler_home'));
  87.                     }
  88.                     return $ret;
  89.                 }
  90.                 not__profiler_home:
  91.                 if (=== strpos($pathinfo'/_profiler/search')) {
  92.                     // _profiler_search
  93.                     if ('/_profiler/search' === $pathinfo) {
  94.                         return array (  '_controller' => 'web_profiler.controller.profiler:searchAction',  '_route' => '_profiler_search',);
  95.                     }
  96.                     // _profiler_search_bar
  97.                     if ('/_profiler/search_bar' === $pathinfo) {
  98.                         return array (  '_controller' => 'web_profiler.controller.profiler:searchBarAction',  '_route' => '_profiler_search_bar',);
  99.                     }
  100.                 }
  101.                 // _profiler_phpinfo
  102.                 if ('/_profiler/phpinfo' === $pathinfo) {
  103.                     return array (  '_controller' => 'web_profiler.controller.profiler:phpinfoAction',  '_route' => '_profiler_phpinfo',);
  104.                 }
  105.                 // _profiler_search_results
  106.                 if (preg_match('#^/_profiler/(?P<token>[^/]++)/search/results$#sD'$pathinfo$matches)) {
  107.                     return $this->mergeDefaults(array_replace($matches, ['_route' => '_profiler_search_results']), array (  '_controller' => 'web_profiler.controller.profiler:searchResultsAction',));
  108.                 }
  109.                 // _profiler_open_file
  110.                 if ('/_profiler/open' === $pathinfo) {
  111.                     return array (  '_controller' => 'web_profiler.controller.profiler:openAction',  '_route' => '_profiler_open_file',);
  112.                 }
  113.                 // _profiler
  114.                 if (preg_match('#^/_profiler/(?P<token>[^/]++)$#sD'$pathinfo$matches)) {
  115.                     return $this->mergeDefaults(array_replace($matches, ['_route' => '_profiler']), array (  '_controller' => 'web_profiler.controller.profiler:panelAction',));
  116.                 }
  117.                 // _profiler_router
  118.                 if (preg_match('#^/_profiler/(?P<token>[^/]++)/router$#sD'$pathinfo$matches)) {
  119.                     return $this->mergeDefaults(array_replace($matches, ['_route' => '_profiler_router']), array (  '_controller' => 'web_profiler.controller.router:panelAction',));
  120.                 }
  121.                 // _profiler_exception
  122.                 if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception$#sD'$pathinfo$matches)) {
  123.                     return $this->mergeDefaults(array_replace($matches, ['_route' => '_profiler_exception']), array (  '_controller' => 'web_profiler.controller.exception:showAction',));
  124.                 }
  125.                 // _profiler_exception_css
  126.                 if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception\\.css$#sD'$pathinfo$matches)) {
  127.                     return $this->mergeDefaults(array_replace($matches, ['_route' => '_profiler_exception_css']), array (  '_controller' => 'web_profiler.controller.exception:cssAction',));
  128.                 }
  129.             }
  130.         }
  131.         if ('/' === $pathinfo && !$allow) {
  132.             throw new Symfony\Component\Routing\Exception\NoConfigurationException();
  133.         }
  134.         throw count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
  135.     }
  136. }