var/cache/dev/srcDevDebugProjectContainerUrlMatcher.php line 50

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($pathinfo)
  16.     {
  17.         $allow $allowSchemes = array();
  18.         if ($ret $this->doMatch($pathinfo$allow$allowSchemes)) {
  19.             return $ret;
  20.         }
  21.         if ($allow) {
  22.             throw new MethodNotAllowedException(array_keys($allow));
  23.         }
  24.         if (!in_array($this->context->getMethod(), array('HEAD''GET'), true)) {
  25.             // no-op
  26.         } elseif ($allowSchemes) {
  27.             redirect_scheme:
  28.             $scheme $this->context->getScheme();
  29.             $this->context->setScheme(key($allowSchemes));
  30.             try {
  31.                 if ($ret $this->doMatch($pathinfo)) {
  32.                     return $this->redirect($pathinfo$ret['_route'], $this->context->getScheme()) + $ret;
  33.                 }
  34.             } finally {
  35.                 $this->context->setScheme($scheme);
  36.             }
  37.         } elseif ('/' !== $pathinfo) {
  38.             $pathinfo '/' !== $pathinfo[-1] ? $pathinfo.'/' substr($pathinfo0, -1);
  39.             if ($ret $this->doMatch($pathinfo$allow$allowSchemes)) {
  40.                 return $this->redirect($pathinfo$ret['_route']) + $ret;
  41.             }
  42.             if ($allowSchemes) {
  43.                 goto redirect_scheme;
  44.             }
  45.         }
  46.         throw new ResourceNotFoundException();
  47.     }
  48.     private function doMatch(string $rawPathinfo, array &$allow = array(), array &$allowSchemes = array()): ?array
  49.     {
  50.         $allow $allowSchemes = array();
  51.         $pathinfo rawurldecode($rawPathinfo);
  52.         $context $this->context;
  53.         $requestMethod $canonicalMethod $context->getMethod();
  54.         if ('HEAD' === $requestMethod) {
  55.             $canonicalMethod 'GET';
  56.         }
  57.         switch ($pathinfo) {
  58.             default:
  59.                 $routes = array(
  60.                     '/api/' => array(array('_route' => 'overblog_graphql_endpoint''_controller' => 'Overblog\\GraphQLBundle\\Controller\\GraphController::endpointAction''_format' => 'json'), nullnullnull),
  61.                     '/api/batch' => array(array('_route' => 'overblog_graphql_batch_endpoint''_controller' => 'Overblog\\GraphQLBundle\\Controller\\GraphController::batchEndpointAction''_format' => 'json'), nullnullnull),
  62.                     '/graphiql' => array(array('_route' => 'overblog_graphiql_endpoint''_controller' => 'Overblog\\GraphiQLBundle\\Controller\\GraphiQLController::indexAction'), nullnullnull),
  63.                     '/_profiler/' => array(array('_route' => '_profiler_home''_controller' => 'web_profiler.controller.profiler::homeAction'), nullnullnull),
  64.                     '/_profiler/search' => array(array('_route' => '_profiler_search''_controller' => 'web_profiler.controller.profiler::searchAction'), nullnullnull),
  65.                     '/_profiler/search_bar' => array(array('_route' => '_profiler_search_bar''_controller' => 'web_profiler.controller.profiler::searchBarAction'), nullnullnull),
  66.                     '/_profiler/phpinfo' => array(array('_route' => '_profiler_phpinfo''_controller' => 'web_profiler.controller.profiler::phpinfoAction'), nullnullnull),
  67.                     '/_profiler/open' => array(array('_route' => '_profiler_open_file''_controller' => 'web_profiler.controller.profiler::openAction'), nullnullnull),
  68.                 );
  69.                 if (!isset($routes[$pathinfo])) {
  70.                     break;
  71.                 }
  72.                 list($ret$requiredHost$requiredMethods$requiredSchemes) = $routes[$pathinfo];
  73.                 $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
  74.                 if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
  75.                     if ($hasRequiredScheme) {
  76.                         $allow += $requiredMethods;
  77.                     }
  78.                     break;
  79.                 }
  80.                 if (!$hasRequiredScheme) {
  81.                     $allowSchemes += $requiredSchemes;
  82.                     break;
  83.                 }
  84.                 return $ret;
  85.         }
  86.         $matchedPathinfo $pathinfo;
  87.         $regexList = array(
  88.             => '{^(?'
  89.                     .'|/api/graphql/([^/]++)(?'
  90.                         .'|(*:31)'
  91.                         .'|/batch(*:44)'
  92.                     .')'
  93.                     .'|/graphiql/([^/]++)(*:70)'
  94.                     .'|/_(?'
  95.                         .'|error/(\\d+)(?:\\.([^/]++))?(*:108)'
  96.                         .'|wdt/([^/]++)(*:128)'
  97.                         .'|profiler/([^/]++)(?'
  98.                             .'|/(?'
  99.                                 .'|search/results(*:174)'
  100.                                 .'|router(*:188)'
  101.                                 .'|exception(?'
  102.                                     .'|(*:208)'
  103.                                     .'|\\.css(*:221)'
  104.                                 .')'
  105.                             .')'
  106.                             .'|(*:231)'
  107.                         .')'
  108.                     .')'
  109.                 .')$}sD',
  110.         );
  111.         foreach ($regexList as $offset => $regex) {
  112.             while (preg_match($regex$matchedPathinfo$matches)) {
  113.                 switch ($m = (int) $matches['MARK']) {
  114.                     default:
  115.                         $routes = array(
  116.                             31 => array(array('_route' => 'overblog_graphql_multiple_endpoint''_controller' => 'Overblog\\GraphQLBundle\\Controller\\GraphController::endpointAction''_format' => 'json'), array('schemaName'), nullnull),
  117.                             44 => array(array('_route' => 'overblog_graphql_batch_multiple_endpoint''_controller' => 'Overblog\\GraphQLBundle\\Controller\\GraphController::batchEndpointAction''_format' => 'json'), array('schemaName'), nullnull),
  118.                             70 => array(array('_route' => 'overblog_graphiql_endpoint_multiple''_controller' => 'Overblog\\GraphiQLBundle\\Controller\\GraphiQLController::indexAction'), array('schemaName'), nullnull),
  119.                             108 => array(array('_route' => '_twig_error_test''_controller' => 'twig.controller.preview_error::previewErrorPageAction''_format' => 'html'), array('code''_format'), nullnull),
  120.                             128 => array(array('_route' => '_wdt''_controller' => 'web_profiler.controller.profiler::toolbarAction'), array('token'), nullnull),
  121.                             174 => array(array('_route' => '_profiler_search_results''_controller' => 'web_profiler.controller.profiler::searchResultsAction'), array('token'), nullnull),
  122.                             188 => array(array('_route' => '_profiler_router''_controller' => 'web_profiler.controller.router::panelAction'), array('token'), nullnull),
  123.                             208 => array(array('_route' => '_profiler_exception''_controller' => 'web_profiler.controller.exception::showAction'), array('token'), nullnull),
  124.                             221 => array(array('_route' => '_profiler_exception_css''_controller' => 'web_profiler.controller.exception::cssAction'), array('token'), nullnull),
  125.                             231 => array(array('_route' => '_profiler''_controller' => 'web_profiler.controller.profiler::panelAction'), array('token'), nullnull),
  126.                         );
  127.                         list($ret$vars$requiredMethods$requiredSchemes) = $routes[$m];
  128.                         foreach ($vars as $i => $v) {
  129.                             if (isset($matches[$i])) {
  130.                                 $ret[$v] = $matches[$i];
  131.                             }
  132.                         }
  133.                         $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
  134.                         if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
  135.                             if ($hasRequiredScheme) {
  136.                                 $allow += $requiredMethods;
  137.                             }
  138.                             break;
  139.                         }
  140.                         if (!$hasRequiredScheme) {
  141.                             $allowSchemes += $requiredSchemes;
  142.                             break;
  143.                         }
  144.                         return $ret;
  145.                 }
  146.                 if (231 === $m) {
  147.                     break;
  148.                 }
  149.                 $regex substr_replace($regex'F'$m $offsetstrlen($m));
  150.                 $offset += strlen($m);
  151.             }
  152.         }
  153.         if ('/' === $pathinfo && !$allow && !$allowSchemes) {
  154.             throw new Symfony\Component\Routing\Exception\NoConfigurationException();
  155.         }
  156.         return null;
  157.     }
  158. }