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.             case '/api/webhook/subscribe':
  59.                 // get_webhook_subscribe
  60.                 $ret = array('_route' => 'get_webhook_subscribe''_controller' => 'App\\Adapter\\Api\\Controller\\WebhookController::getSubscribeAction''_format' => 'json');
  61.                 if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  62.                     $allow += $a;
  63.                     goto not_get_webhook_subscribe;
  64.                 }
  65.                 return $ret;
  66.                 not_get_webhook_subscribe:
  67.                 // post_webhook_subscribe
  68.                 $ret = array('_route' => 'post_webhook_subscribe''_controller' => 'App\\Adapter\\Api\\Controller\\WebhookController::postSubscribeAction''_format' => 'json');
  69.                 if (!isset(($a = array('POST' => 0))[$requestMethod])) {
  70.                     $allow += $a;
  71.                     goto not_post_webhook_subscribe;
  72.                 }
  73.                 return $ret;
  74.                 not_post_webhook_subscribe:
  75.                 break;
  76.             case '/rest-doc':
  77.                 // app.swagger_ui
  78.                 if ((!preg_match("/hubusa.altitudegroupinc.com/"$context->getHost()))) {
  79.                     $ret = array('_route' => 'app.swagger_ui''_controller' => 'nelmio_api_doc.controller.swagger_ui');
  80.                     if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  81.                         $allow += $a;
  82.                         goto not_appswagger_ui;
  83.                     }
  84.                     return $ret;
  85.                 }
  86.                 not_appswagger_ui:
  87.                 break;
  88.             default:
  89.                 $routes = array(
  90.                     '/_profiler/' => array(array('_route' => '_profiler_home''_controller' => 'web_profiler.controller.profiler::homeAction'), nullnullnull),
  91.                     '/_profiler/search' => array(array('_route' => '_profiler_search''_controller' => 'web_profiler.controller.profiler::searchAction'), nullnullnull),
  92.                     '/_profiler/search_bar' => array(array('_route' => '_profiler_search_bar''_controller' => 'web_profiler.controller.profiler::searchBarAction'), nullnullnull),
  93.                     '/_profiler/phpinfo' => array(array('_route' => '_profiler_phpinfo''_controller' => 'web_profiler.controller.profiler::phpinfoAction'), nullnullnull),
  94.                     '/_profiler/open' => array(array('_route' => '_profiler_open_file''_controller' => 'web_profiler.controller.profiler::openAction'), nullnullnull),
  95.                     '/api/login_check' => array(array('_route' => 'api_login_check'), nullnullnull),
  96.                     '/api/user/list' => array(array('_route' => 'get_user_list''_controller' => 'App\\Adapter\\Api\\Controller\\UserController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  97.                     '/api/user' => array(array('_route' => 'post_user''_controller' => 'App\\Adapter\\Api\\Controller\\UserController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  98.                     '/api/invoice/list' => array(array('_route' => 'get_invoice_list''_controller' => 'App\\Adapter\\Api\\Controller\\InvoiceController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  99.                     '/api/invoice' => array(array('_route' => 'post_invoice''_controller' => 'App\\Adapter\\Api\\Controller\\InvoiceController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  100.                     '/api/creditmemo/list' => array(array('_route' => 'get_creditmemo_list''_controller' => 'App\\Adapter\\Api\\Controller\\CreditMemoController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  101.                     '/api/creditmemo' => array(array('_route' => 'post_creditmemo''_controller' => 'App\\Adapter\\Api\\Controller\\CreditMemoController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  102.                     '/api/payment/list' => array(array('_route' => 'get_payment_list''_controller' => 'App\\Adapter\\Api\\Controller\\PaymentController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  103.                     '/api/payment' => array(array('_route' => 'post_payment''_controller' => 'App\\Adapter\\Api\\Controller\\PaymentController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  104.                     '/api/payments' => array(array('_route' => 'post_payments''_controller' => 'App\\Adapter\\Api\\Controller\\PaymentsController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  105.                     '/api/order/list' => array(array('_route' => 'get_order_list''_controller' => 'App\\Adapter\\Api\\Controller\\OrderController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  106.                     '/api/order' => array(array('_route' => 'post_order''_controller' => 'App\\Adapter\\Api\\Controller\\OrderController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  107.                     '/api/itemreceipt/list' => array(array('_route' => 'get_itemreceipt_list''_controller' => 'App\\Adapter\\Api\\Controller\\ItemReceiptController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  108.                     '/api/itemreceipt' => array(array('_route' => 'post_itemreceipt''_controller' => 'App\\Adapter\\Api\\Controller\\ItemReceiptController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  109.                     '/api/bill/list' => array(array('_route' => 'get_bill_list''_controller' => 'App\\Adapter\\Api\\Controller\\BillController::getListAction''_format' => 'json'), null, array('GET' => 0), null),
  110.                     '/api/bill' => array(array('_route' => 'post_bill''_controller' => 'App\\Adapter\\Api\\Controller\\BillController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  111.                     '/api/initial/sync' => array(array('_route' => 'post_initial_sync''_controller' => 'App\\Adapter\\Api\\Controller\\SyncController::postSyncAction''_format' => 'json'), null, array('POST' => 0), null),
  112.                     '/api/auth/new/account' => array(array('_route' => 'post_auth_new_account''_controller' => 'App\\Adapter\\Api\\Controller\\AuthController::postNewAccountAction''_format' => 'json'), null, array('POST' => 0), null),
  113.                     '/api/auth/refresh' => array(array('_route' => 'post_auth_refresh''_controller' => 'App\\Adapter\\Api\\Controller\\AuthController::postRefreshAction''_format' => 'json'), null, array('POST' => 0), null),
  114.                     '/api/tools/qwc' => array(array('_route' => 'get_tools_qwc''_controller' => 'App\\Adapter\\Api\\Controller\\ToolsController::getQwcAction''_format' => 'json'), null, array('GET' => 0), null),
  115.                     '/api/tools/qwc/password' => array(array('_route' => 'get_tools_qwc_password''_controller' => 'App\\Adapter\\Api\\Controller\\ToolsController::getQwcPasswordAction''_format' => 'json'), null, array('GET' => 0), null),
  116.                     '/api/privileges' => array(array('_route' => 'post_privileges''_controller' => 'App\\Adapter\\Api\\Controller\\PrivilegesController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  117.                     '/api/customersync' => array(array('_route' => 'post_customersync''_controller' => 'App\\Adapter\\Api\\Controller\\CustomerSyncController::postAction''_format' => 'json'), null, array('POST' => 0), null),
  118.                     '/' => array(array('_route' => 'home''_controller' => 'App\\Controller\\IndexController::index'), nullnullnull),
  119.                     '/qbwc/qbsoap' => array(array('_route' => 'qbsoap_route''_controller' => 'App\\Adapter\\Qbwc\\Controller\\QbSoapController::runWebConnectorMethods'), nullnullnull),
  120.                 );
  121.                 if (!isset($routes[$pathinfo])) {
  122.                     break;
  123.                 }
  124.                 list($ret$requiredHost$requiredMethods$requiredSchemes) = $routes[$pathinfo];
  125.                 $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
  126.                 if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
  127.                     if ($hasRequiredScheme) {
  128.                         $allow += $requiredMethods;
  129.                     }
  130.                     break;
  131.                 }
  132.                 if (!$hasRequiredScheme) {
  133.                     $allowSchemes += $requiredSchemes;
  134.                     break;
  135.                 }
  136.                 return $ret;
  137.         }
  138.         $matchedPathinfo $pathinfo;
  139.         $regexList = array(
  140.             => '{^(?'
  141.                     .'|/_(?'
  142.                         .'|error/(\\d+)(?:\\.([^/]++))?(*:38)'
  143.                         .'|wdt/([^/]++)(*:57)'
  144.                         .'|profiler/([^/]++)(?'
  145.                             .'|/(?'
  146.                                 .'|search/results(*:102)'
  147.                                 .'|router(*:116)'
  148.                                 .'|exception(?'
  149.                                     .'|(*:136)'
  150.                                     .'|\\.css(*:149)'
  151.                                 .')'
  152.                             .')'
  153.                             .'|(*:159)'
  154.                         .')'
  155.                     .')'
  156.                     .'|/api/(?'
  157.                         .'|user/([^/]++)(?'
  158.                             .'|(*:193)'
  159.                         .')'
  160.                         .'|i(?'
  161.                             .'|nvoice/([^/]++)(?'
  162.                                 .'|(*:224)'
  163.                             .')'
  164.                             .'|temreceipt/([^/]++)(?'
  165.                                 .'|(*:255)'
  166.                             .')'
  167.                         .')'
  168.                         .'|creditmemo/([^/]++)(?'
  169.                             .'|(*:287)'
  170.                         .')'
  171.                         .'|payment/([^/]++)(?'
  172.                             .'|(*:315)'
  173.                         .')'
  174.                         .'|order/([^/]++)(?'
  175.                             .'|(*:341)'
  176.                         .')'
  177.                         .'|bill/([^/]++)(?'
  178.                             .'|(*:366)'
  179.                         .')'
  180.                     .')'
  181.                 .')$}sD',
  182.         );
  183.         foreach ($regexList as $offset => $regex) {
  184.             while (preg_match($regex$matchedPathinfo$matches)) {
  185.                 switch ($m = (int) $matches['MARK']) {
  186.                     case 193:
  187.                         $matches = array('id' => $matches[1] ?? null);
  188.                         // get_user
  189.                         $ret $this->mergeDefaults(array('_route' => 'get_user') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\UserController::getAction''_format' => 'json'));
  190.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  191.                             $allow += $a;
  192.                             goto not_get_user;
  193.                         }
  194.                         return $ret;
  195.                         not_get_user:
  196.                         // delete_user
  197.                         $ret $this->mergeDefaults(array('_route' => 'delete_user') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\UserController::deleteAction''_format' => 'json'));
  198.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  199.                             $allow += $a;
  200.                             goto not_delete_user;
  201.                         }
  202.                         return $ret;
  203.                         not_delete_user:
  204.                         break;
  205.                     case 224:
  206.                         $matches = array('id' => $matches[1] ?? null);
  207.                         // get_invoice
  208.                         $ret $this->mergeDefaults(array('_route' => 'get_invoice') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\InvoiceController::getAction''_format' => 'json'));
  209.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  210.                             $allow += $a;
  211.                             goto not_get_invoice;
  212.                         }
  213.                         return $ret;
  214.                         not_get_invoice:
  215.                         // delete_invoice
  216.                         $ret $this->mergeDefaults(array('_route' => 'delete_invoice') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\InvoiceController::deleteAction''_format' => 'json'));
  217.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  218.                             $allow += $a;
  219.                             goto not_delete_invoice;
  220.                         }
  221.                         return $ret;
  222.                         not_delete_invoice:
  223.                         break;
  224.                     case 255:
  225.                         $matches = array('id' => $matches[1] ?? null);
  226.                         // get_itemreceipt
  227.                         $ret $this->mergeDefaults(array('_route' => 'get_itemreceipt') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\ItemReceiptController::getAction''_format' => 'json'));
  228.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  229.                             $allow += $a;
  230.                             goto not_get_itemreceipt;
  231.                         }
  232.                         return $ret;
  233.                         not_get_itemreceipt:
  234.                         // delete_itemreceipt
  235.                         $ret $this->mergeDefaults(array('_route' => 'delete_itemreceipt') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\ItemReceiptController::deleteAction''_format' => 'json'));
  236.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  237.                             $allow += $a;
  238.                             goto not_delete_itemreceipt;
  239.                         }
  240.                         return $ret;
  241.                         not_delete_itemreceipt:
  242.                         break;
  243.                     case 287:
  244.                         $matches = array('id' => $matches[1] ?? null);
  245.                         // get_creditmemo
  246.                         $ret $this->mergeDefaults(array('_route' => 'get_creditmemo') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\CreditMemoController::getAction''_format' => 'json'));
  247.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  248.                             $allow += $a;
  249.                             goto not_get_creditmemo;
  250.                         }
  251.                         return $ret;
  252.                         not_get_creditmemo:
  253.                         // delete_creditmemo
  254.                         $ret $this->mergeDefaults(array('_route' => 'delete_creditmemo') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\CreditMemoController::deleteAction''_format' => 'json'));
  255.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  256.                             $allow += $a;
  257.                             goto not_delete_creditmemo;
  258.                         }
  259.                         return $ret;
  260.                         not_delete_creditmemo:
  261.                         break;
  262.                     case 315:
  263.                         $matches = array('id' => $matches[1] ?? null);
  264.                         // get_payment
  265.                         $ret $this->mergeDefaults(array('_route' => 'get_payment') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\PaymentController::getAction''_format' => 'json'));
  266.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  267.                             $allow += $a;
  268.                             goto not_get_payment;
  269.                         }
  270.                         return $ret;
  271.                         not_get_payment:
  272.                         // delete_payment
  273.                         $ret $this->mergeDefaults(array('_route' => 'delete_payment') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\PaymentController::deleteAction''_format' => 'json'));
  274.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  275.                             $allow += $a;
  276.                             goto not_delete_payment;
  277.                         }
  278.                         return $ret;
  279.                         not_delete_payment:
  280.                         break;
  281.                     case 341:
  282.                         $matches = array('id' => $matches[1] ?? null);
  283.                         // get_order
  284.                         $ret $this->mergeDefaults(array('_route' => 'get_order') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\OrderController::getAction''_format' => 'json'));
  285.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  286.                             $allow += $a;
  287.                             goto not_get_order;
  288.                         }
  289.                         return $ret;
  290.                         not_get_order:
  291.                         // delete_order
  292.                         $ret $this->mergeDefaults(array('_route' => 'delete_order') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\OrderController::deleteAction''_format' => 'json'));
  293.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  294.                             $allow += $a;
  295.                             goto not_delete_order;
  296.                         }
  297.                         return $ret;
  298.                         not_delete_order:
  299.                         break;
  300.                     case 366:
  301.                         $matches = array('id' => $matches[1] ?? null);
  302.                         // get_bill
  303.                         $ret $this->mergeDefaults(array('_route' => 'get_bill') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\BillController::getAction''_format' => 'json'));
  304.                         if (!isset(($a = array('GET' => 0))[$canonicalMethod])) {
  305.                             $allow += $a;
  306.                             goto not_get_bill;
  307.                         }
  308.                         return $ret;
  309.                         not_get_bill:
  310.                         // delete_bill
  311.                         $ret $this->mergeDefaults(array('_route' => 'delete_bill') + $matches, array('_controller' => 'App\\Adapter\\Api\\Controller\\BillController::deleteAction''_format' => 'json'));
  312.                         if (!isset(($a = array('DELETE' => 0))[$requestMethod])) {
  313.                             $allow += $a;
  314.                             goto not_delete_bill;
  315.                         }
  316.                         return $ret;
  317.                         not_delete_bill:
  318.                         break;
  319.                     default:
  320.                         $routes = array(
  321.                             38 => array(array('_route' => '_twig_error_test''_controller' => 'twig.controller.preview_error::previewErrorPageAction''_format' => 'html'), array('code''_format'), nullnull),
  322.                             57 => array(array('_route' => '_wdt''_controller' => 'web_profiler.controller.profiler::toolbarAction'), array('token'), nullnull),
  323.                             102 => array(array('_route' => '_profiler_search_results''_controller' => 'web_profiler.controller.profiler::searchResultsAction'), array('token'), nullnull),
  324.                             116 => array(array('_route' => '_profiler_router''_controller' => 'web_profiler.controller.router::panelAction'), array('token'), nullnull),
  325.                             136 => array(array('_route' => '_profiler_exception''_controller' => 'web_profiler.controller.exception::showAction'), array('token'), nullnull),
  326.                             149 => array(array('_route' => '_profiler_exception_css''_controller' => 'web_profiler.controller.exception::cssAction'), array('token'), nullnull),
  327.                             159 => array(array('_route' => '_profiler''_controller' => 'web_profiler.controller.profiler::panelAction'), array('token'), nullnull),
  328.                         );
  329.                         list($ret$vars$requiredMethods$requiredSchemes) = $routes[$m];
  330.                         foreach ($vars as $i => $v) {
  331.                             if (isset($matches[$i])) {
  332.                                 $ret[$v] = $matches[$i];
  333.                             }
  334.                         }
  335.                         $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
  336.                         if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
  337.                             if ($hasRequiredScheme) {
  338.                                 $allow += $requiredMethods;
  339.                             }
  340.                             break;
  341.                         }
  342.                         if (!$hasRequiredScheme) {
  343.                             $allowSchemes += $requiredSchemes;
  344.                             break;
  345.                         }
  346.                         return $ret;
  347.                 }
  348.                 if (366 === $m) {
  349.                     break;
  350.                 }
  351.                 $regex substr_replace($regex'F'$m $offsetstrlen($m));
  352.                 $offset += strlen($m);
  353.             }
  354.         }
  355.         if ('/' === $pathinfo && !$allow && !$allowSchemes) {
  356.             throw new Symfony\Component\Routing\Exception\NoConfigurationException();
  357.         }
  358.         return null;
  359.     }
  360. }