<?php

use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\RequestContext;

/**
 * This class has been auto-generated
 * by the Symfony Routing Component.
 */
class srcProdProjectContainerUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
{
    public function __construct(RequestContext $context)
    {
        $this->context = $context;
    }

    public function match($pathinfo)
    {
        $allow = $allowSchemes = array();
        if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) {
            return $ret;
        }
        if ($allow) {
            throw new MethodNotAllowedException(array_keys($allow));
        }
        if (!in_array($this->context->getMethod(), array('HEAD', 'GET'), true)) {
            // no-op
        } elseif ($allowSchemes) {
            redirect_scheme:
            $scheme = $this->context->getScheme();
            $this->context->setScheme(key($allowSchemes));
            try {
                if ($ret = $this->doMatch($pathinfo)) {
                    return $this->redirect($pathinfo, $ret['_route'], $this->context->getScheme()) + $ret;
                }
            } finally {
                $this->context->setScheme($scheme);
            }
        } elseif ('/' !== $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/') {
            $pathinfo = $trimmedPathinfo === $pathinfo ? $pathinfo.'/' : $trimmedPathinfo;
            if ($ret = $this->doMatch($pathinfo, $allow, $allowSchemes)) {
                return $this->redirect($pathinfo, $ret['_route']) + $ret;
            }
            if ($allowSchemes) {
                goto redirect_scheme;
            }
        }

        throw new ResourceNotFoundException();
    }

    private function doMatch(string $pathinfo, array &$allow = array(), array &$allowSchemes = array()): array
    {
        $allow = $allowSchemes = array();
        $pathinfo = rawurldecode($pathinfo) ?: '/';
        $trimmedPathinfo = rtrim($pathinfo, '/') ?: '/';
        $context = $this->context;
        $requestMethod = $canonicalMethod = $context->getMethod();

        if ('HEAD' === $requestMethod) {
            $canonicalMethod = 'GET';
        }

        switch ($trimmedPathinfo) {
            default:
                $routes = array(
                    '/' => array(array('_route' => 'website_index', '_controller' => 'App\\Controller\\PrincipalController::index'), null, null, null, false),
                    '/contacto' => array(array('_route' => 'website_contacto', '_controller' => 'App\\Controller\\PrincipalController::contacto'), null, null, null, false),
                    '/mantenimiento' => array(array('_route' => 'website_mantenimiento', '_controller' => 'App\\Controller\\PrincipalController::mantenimiento'), null, null, null, false),
                    '/buscardominio' => array(array('_route' => 'website_buscar_dominio', '_controller' => 'App\\Controller\\PrincipalController::buscarDominio'), null, null, null, false),
                    '/admin/cliente' => array(array('_route' => 'cliente_listar', '_controller' => 'App\\Controller\\ClienteController::listar'), null, null, null, false),
                    '/servicios' => array(array('_route' => 'cliente_servicios', '_controller' => 'App\\Controller\\ClienteController::servicio'), null, null, null, false),
                    '/orden/registrar' => array(array('_route' => 'orden_registrar', '_controller' => 'App\\Controller\\OrdenController::registrar'), null, null, null, false),
                    '/orden' => array(array('_route' => 'orden_listar', '_controller' => 'App\\Controller\\OrdenController::listar'), null, null, null, false),
                    '/admin/orden' => array(array('_route' => 'orden_listar_admin', '_controller' => 'App\\Controller\\OrdenController::listarAdmin'), null, null, null, false),
                    '/admin' => array(array('_route' => 'admin_index', '_controller' => 'App\\Controller\\AdminController::index'), null, null, null, false),
                    '/usuario/registrar' => array(array('_route' => 'usuario_registrar', '_controller' => 'App\\Controller\\UsuarioController::registrar'), null, null, null, false),
                    '/usuario/reiniciar' => array(array('_route' => 'usuario_reiniciar', '_controller' => 'App\\Controller\\UsuarioController::reiniciar'), null, null, null, false),
                    '/login' => array(array('_route' => 'login', '_controller' => 'App\\Controller\\UsuarioController::login'), null, null, null, false),
                    '/login_check' => array(array('_route' => 'login_check', '_controller' => 'App\\Controller\\UsuarioController::login_check'), null, null, null, false),
                    '/logout' => array(array('_route' => 'logout', '_controller' => 'App\\Controller\\UsuarioController::logout'), null, null, null, false),
                    '/admin/plan' => array(array('_route' => 'plan_listar', '_controller' => 'App\\Controller\\PlanController::listar'), null, null, null, false),
                    '/admin/plan/registrar' => array(array('_route' => 'plan_registrar', '_controller' => 'App\\Controller\\PlanController::registrar'), null, null, null, false),
                    '/admin/extension' => array(array('_route' => 'extension_lista', '_controller' => 'App\\Controller\\ExtensionController::listar'), null, null, null, false),
                    '/admin/caracteristicas' => array(array('_route' => 'caracteristica_listar', '_controller' => 'App\\Controller\\CaracteristicaController::listar'), null, null, null, false),
                    '/admin/caracteristica/registrar' => array(array('_route' => 'caracteristica_registrar', '_controller' => 'App\\Controller\\CaracteristicaController::registrar'), null, null, null, false),
                );

                if (!isset($routes[$trimmedPathinfo])) {
                    break;
                }
                list($ret, $requiredHost, $requiredMethods, $requiredSchemes, $hasTrailingSlash) = $routes[$trimmedPathinfo];
                if ('/' !== $pathinfo && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) {
                    if ('GET' === $canonicalMethod && (!$requiredMethods || isset($requiredMethods['GET']))) {
                        return $allow = $allowSchemes = array();
                    }
                    break;
                }

                $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
                if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
                    if ($hasRequiredScheme) {
                        $allow += $requiredMethods;
                    }
                    break;
                }
                if (!$hasRequiredScheme) {
                    $allowSchemes += $requiredSchemes;
                    break;
                }

                return $ret;
        }

        $matchedPathinfo = $pathinfo;
        $regexList = array(
            0 => '{^(?'
                    .'|/admin/(?'
                        .'|c(?'
                            .'|liente/(?'
                                .'|servicio/([^/]++)(*:48)'
                                .'|hosting/credencial/enviar/([^/]++)(*:89)'
                            .')'
                            .'|aracteristica/(?'
                                .'|editar/([^/]++)(*:129)'
                                .'|activar/([^/]++)(*:153)'
                            .')'
                        .')'
                        .'|orden/(?'
                            .'|ver/([^/]++)(*:184)'
                            .'|procesar/([^/]++)(*:209)'
                        .')'
                        .'|plan(?'
                            .'|/ver/([^/]++)(*:238)'
                            .'|es/editar/([^/]++)(*:264)'
                        .')'
                        .'|extension(?'
                            .'|/(?'
                                .'|ver/([^/]++)(*:301)'
                                .'|editar/([^/]++)(*:324)'
                            .')'
                            .'|es/activar/([^/]++)(*:352)'
                        .')'
                    .')'
                    .'|/orden/(?'
                        .'|ver/([^/]++)(*:384)'
                        .'|pagar/([^/]++)(*:406)'
                        .'|anular/([^/]++)(*:429)'
                    .')'
                    .'|/usuario/reestablecer/([^/]++)(*:468)'
                .')/?$}sD',
        );

        foreach ($regexList as $offset => $regex) {
            while (preg_match($regex, $matchedPathinfo, $matches)) {
                switch ($m = (int) $matches['MARK']) {
                    default:
                        $routes = array(
                            48 => array(array('_route' => 'cliente_servicio_admin', '_controller' => 'App\\Controller\\ClienteController::servicioAdmin'), array('id'), null, null, false, true),
                            89 => array(array('_route' => 'credencial_hosting_enviar', '_controller' => 'App\\Controller\\ClienteController::enviarCredencialHost'), array('id'), null, null, false, true),
                            129 => array(array('_route' => 'caracteristica_editar', '_controller' => 'App\\Controller\\CaracteristicaController::editar'), array('id'), null, null, false, true),
                            153 => array(array('_route' => 'caracteristica_activar', '_controller' => 'App\\Controller\\CaracteristicaController::activar'), array('id'), null, null, false, true),
                            184 => array(array('_route' => 'orden_ver_admin', '_controller' => 'App\\Controller\\OrdenController::verAdmin'), array('id'), null, null, false, true),
                            209 => array(array('_route' => 'orden_procesar_admin', '_controller' => 'App\\Controller\\OrdenController::procesarAdmin'), array('id'), null, null, false, true),
                            238 => array(array('_route' => 'plan_ver', '_controller' => 'App\\Controller\\PlanController::ver'), array('id'), null, null, false, true),
                            264 => array(array('_route' => 'plan_editar', '_controller' => 'App\\Controller\\PlanController::editar'), array('id'), null, null, false, true),
                            301 => array(array('_route' => 'extension_ver', '_controller' => 'App\\Controller\\ExtensionController::ver'), array('id'), null, null, false, true),
                            324 => array(array('_route' => 'extension_editar', '_controller' => 'App\\Controller\\ExtensionController::editar'), array('id'), null, null, false, true),
                            352 => array(array('_route' => 'extension_activar', '_controller' => 'App\\Controller\\ExtensionController::activar'), array('id'), null, null, false, true),
                            384 => array(array('_route' => 'orden_ver', '_controller' => 'App\\Controller\\OrdenController::ver'), array('id'), null, null, false, true),
                            406 => array(array('_route' => 'orden_pagar', '_controller' => 'App\\Controller\\OrdenController::pagar'), array('id'), null, null, false, true),
                            429 => array(array('_route' => 'orden_anular', '_controller' => 'App\\Controller\\OrdenController::anular'), array('id'), null, null, false, true),
                            468 => array(array('_route' => 'usuario_reestablecer', '_controller' => 'App\\Controller\\UsuarioController::reestablecer'), array('token'), null, null, false, true),
                        );

                        list($ret, $vars, $requiredMethods, $requiredSchemes, $hasTrailingSlash, $hasTrailingVar) = $routes[$m];

                        if ($trimmedPathinfo === $pathinfo || !$hasTrailingVar) {
                            // no-op
                        } elseif (preg_match($regex, rtrim($matchedPathinfo, '/') ?: '/', $n) && $m === (int) $n['MARK']) {
                            $matches = $n;
                        } else {
                            $hasTrailingSlash = true;
                        }
                        if ('/' !== $pathinfo && $hasTrailingSlash === ($trimmedPathinfo === $pathinfo)) {
                            if ('GET' === $canonicalMethod && (!$requiredMethods || isset($requiredMethods['GET']))) {
                                return $allow = $allowSchemes = array();
                            }
                            if ($trimmedPathinfo === $pathinfo || !$hasTrailingVar) {
                                break;
                            }
                        }

                        foreach ($vars as $i => $v) {
                            if (isset($matches[1 + $i])) {
                                $ret[$v] = $matches[1 + $i];
                            }
                        }

                        $hasRequiredScheme = !$requiredSchemes || isset($requiredSchemes[$context->getScheme()]);
                        if ($requiredMethods && !isset($requiredMethods[$canonicalMethod]) && !isset($requiredMethods[$requestMethod])) {
                            if ($hasRequiredScheme) {
                                $allow += $requiredMethods;
                            }
                            break;
                        }
                        if (!$hasRequiredScheme) {
                            $allowSchemes += $requiredSchemes;
                            break;
                        }

                        return $ret;
                }

                if (468 === $m) {
                    break;
                }
                $regex = substr_replace($regex, 'F', $m - $offset, 1 + strlen($m));
                $offset += strlen($m);
            }
        }
        if ('/' === $pathinfo && !$allow && !$allowSchemes) {
            throw new Symfony\Component\Routing\Exception\NoConfigurationException();
        }

        return array();
    }
}
