<?php

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

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

    public function match($pathinfo)
    {
        $allow = array();
        $pathinfo = rawurldecode($pathinfo);
        $trimmedPathinfo = rtrim($pathinfo, '/');
        $context = $this->context;
        $request = $this->request;
        $requestMethod = $canonicalMethod = $context->getMethod();
        $scheme = $context->getScheme();

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


        if (0 === strpos($pathinfo, '/_')) {
            // _wdt
            if (0 === strpos($pathinfo, '/_wdt') && preg_match('#^/_wdt/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => '_wdt')), array (  '_controller' => 'web_profiler.controller.profiler:toolbarAction',));
            }

            if (0 === strpos($pathinfo, '/_profiler')) {
                // _profiler_home
                if ('/_profiler' === $trimmedPathinfo) {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', '_profiler_home');
                    }

                    return array (  '_controller' => 'web_profiler.controller.profiler:homeAction',  '_route' => '_profiler_home',);
                }

                if (0 === strpos($pathinfo, '/_profiler/search')) {
                    // _profiler_search
                    if ('/_profiler/search' === $pathinfo) {
                        return array (  '_controller' => 'web_profiler.controller.profiler:searchAction',  '_route' => '_profiler_search',);
                    }

                    // _profiler_search_bar
                    if ('/_profiler/search_bar' === $pathinfo) {
                        return array (  '_controller' => 'web_profiler.controller.profiler:searchBarAction',  '_route' => '_profiler_search_bar',);
                    }

                }

                // _profiler_phpinfo
                if ('/_profiler/phpinfo' === $pathinfo) {
                    return array (  '_controller' => 'web_profiler.controller.profiler:phpinfoAction',  '_route' => '_profiler_phpinfo',);
                }

                // _profiler_search_results
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/search/results$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_search_results')), array (  '_controller' => 'web_profiler.controller.profiler:searchResultsAction',));
                }

                // _profiler_open_file
                if ('/_profiler/open' === $pathinfo) {
                    return array (  '_controller' => 'web_profiler.controller.profiler:openAction',  '_route' => '_profiler_open_file',);
                }

                // _profiler
                if (preg_match('#^/_profiler/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler')), array (  '_controller' => 'web_profiler.controller.profiler:panelAction',));
                }

                // _profiler_router
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/router$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_router')), array (  '_controller' => 'web_profiler.controller.router:panelAction',));
                }

                // _profiler_exception
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception')), array (  '_controller' => 'web_profiler.controller.exception:showAction',));
                }

                // _profiler_exception_css
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception\\.css$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception_css')), array (  '_controller' => 'web_profiler.controller.exception:cssAction',));
                }

            }

            // _twig_error_test
            if (0 === strpos($pathinfo, '/_error') && preg_match('#^/_error/(?P<code>\\d+)(?:\\.(?P<_format>[^/]++))?$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => '_twig_error_test')), array (  '_controller' => 'twig.controller.preview_error:previewErrorPageAction',  '_format' => 'html',));
            }

        }

        elseif (0 === strpos($pathinfo, '/charity')) {
            // charity_index
            if ('/charity' === $trimmedPathinfo) {
                if ('GET' !== $canonicalMethod) {
                    $allow[] = 'GET';
                    goto not_charity_index;
                }

                if (substr($pathinfo, -1) !== '/') {
                    return $this->redirect($pathinfo.'/', 'charity_index');
                }

                return array (  '_controller' => 'AppBundle\\Controller\\CharityController::indexAction',  '_route' => 'charity_index',);
            }
            not_charity_index:

            // charity_qr
            if (0 === strpos($pathinfo, '/charity/qr') && preg_match('#^/charity/qr/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                if ('GET' !== $canonicalMethod) {
                    $allow[] = 'GET';
                    goto not_charity_qr;
                }

                return $this->mergeDefaults(array_replace($matches, array('_route' => 'charity_qr')), array (  '_controller' => 'AppBundle\\Controller\\CharityController::qrAction',));
            }
            not_charity_qr:

            // charity_donate
            if (0 === strpos($pathinfo, '/charity/donate') && preg_match('#^/charity/donate/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                if (!in_array($canonicalMethod, array('GET', 'POST'))) {
                    $allow = array_merge($allow, array('GET', 'POST'));
                    goto not_charity_donate;
                }

                return $this->mergeDefaults(array_replace($matches, array('_route' => 'charity_donate')), array (  '_controller' => 'AppBundle\\Controller\\CharityController::donateAction',));
            }
            not_charity_donate:

            // charity_download_qr
            if (0 === strpos($pathinfo, '/charity/download/qr') && preg_match('#^/charity/download/qr/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                if ('GET' !== $canonicalMethod) {
                    $allow[] = 'GET';
                    goto not_charity_download_qr;
                }

                return $this->mergeDefaults(array_replace($matches, array('_route' => 'charity_download_qr')), array (  '_controller' => 'AppBundle\\Controller\\CharityController::downloadAction',));
            }
            not_charity_download_qr:

            // charity_thanks
            if ('/charity/thanks' === $pathinfo) {
                if ('GET' !== $canonicalMethod) {
                    $allow[] = 'GET';
                    goto not_charity_thanks;
                }

                return array (  '_controller' => 'AppBundle\\Controller\\CharityController::thanksAction',  '_route' => 'charity_thanks',);
            }
            not_charity_thanks:

            // charity_new
            if ('/charity/new' === $pathinfo) {
                if (!in_array($canonicalMethod, array('GET', 'POST'))) {
                    $allow = array_merge($allow, array('GET', 'POST'));
                    goto not_charity_new;
                }

                return array (  '_controller' => 'AppBundle\\Controller\\CharityController::newAction',  '_route' => 'charity_new',);
            }
            not_charity_new:

            // charity_show
            if (preg_match('#^/charity/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                if ('GET' !== $canonicalMethod) {
                    $allow[] = 'GET';
                    goto not_charity_show;
                }

                return $this->mergeDefaults(array_replace($matches, array('_route' => 'charity_show')), array (  '_controller' => 'AppBundle\\Controller\\CharityController::showAction',));
            }
            not_charity_show:

            // charity_edit
            if (preg_match('#^/charity/(?P<id>[^/]++)/edit$#s', $pathinfo, $matches)) {
                if (!in_array($canonicalMethod, array('GET', 'POST'))) {
                    $allow = array_merge($allow, array('GET', 'POST'));
                    goto not_charity_edit;
                }

                return $this->mergeDefaults(array_replace($matches, array('_route' => 'charity_edit')), array (  '_controller' => 'AppBundle\\Controller\\CharityController::editAction',));
            }
            not_charity_edit:

            // charity_delete
            if (preg_match('#^/charity/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                if ('DELETE' !== $canonicalMethod) {
                    $allow[] = 'DELETE';
                    goto not_charity_delete;
                }

                return $this->mergeDefaults(array_replace($matches, array('_route' => 'charity_delete')), array (  '_controller' => 'AppBundle\\Controller\\CharityController::deleteAction',));
            }
            not_charity_delete:

        }

        // homepage
        if ('' === $trimmedPathinfo) {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'homepage');
            }

            return array (  '_controller' => 'AppBundle\\Controller\\DefaultController::indexAction',  '_route' => 'homepage',);
        }

        if (0 === strpos($pathinfo, '/qrcode')) {
            // endroid_qrcode_generate
            if (preg_match('#^/qrcode/(?P<text>[\\w\\W]+)\\.(?P<extension>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'endroid_qrcode_generate')), array (  '_controller' => 'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController::generateAction',));
            }

            // endroid_qrcode_twig_functions
            if ('/qrcode/twig' === $pathinfo) {
                return array (  '_controller' => 'Endroid\\QrCode\\Bundle\\Controller\\QrCodeController::twigFunctionsAction',  '_route' => 'endroid_qrcode_twig_functions',);
            }

        }

        throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
    }
}
