HosipLan

Untitled

Dec 1st, 2011
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.40 KB | None | 0 0
  1. <?php
  2.  
  3. use Symfony\Component\Routing\Exception\MethodNotAllowedException;
  4. use Symfony\Component\Routing\Exception\ResourceNotFoundException;
  5. use Symfony\Component\Routing\RequestContext;
  6.  
  7. /**
  8.  * appdevUrlMatcher
  9.  *
  10.  * This class has been auto-generated
  11.  * by the Symfony Routing Component.
  12.  */
  13. class appdevUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
  14. {
  15.     /**
  16.      * Constructor.
  17.      */
  18.     public function __construct(RequestContext $context)
  19.     {
  20.         $this->context = $context;
  21.     }
  22.  
  23.     public function match($pathinfo)
  24.     {
  25.         $allow = array();
  26.         $pathinfo = urldecode($pathinfo);
  27.  
  28.         // _welcome
  29.         if (rtrim($pathinfo, '/') === '') {
  30.             if (substr($pathinfo, -1) !== '/') {
  31.                 return $this->redirect($pathinfo.'/', '_welcome');
  32.             }
  33.             return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\WelcomeController::indexAction',  '_route' => '_welcome',);
  34.         }
  35.  
  36.         // _demo_login
  37.         if ($pathinfo === '/demo/secured/login') {
  38.             return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::loginAction',  '_route' => '_demo_login',);
  39.         }
  40.  
  41.         // _security_check
  42.         if ($pathinfo === '/demo/secured/login_check') {
  43.             return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::securityCheckAction',  '_route' => '_security_check',);
  44.         }
  45.  
  46.         // _demo_logout
  47.         if ($pathinfo === '/demo/secured/logout') {
  48.             return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::logoutAction',  '_route' => '_demo_logout',);
  49.         }
  50.  
  51.         // acme_demo_secured_hello
  52.         if ($pathinfo === '/demo/secured/hello') {
  53.             return array (  'name' => 'World',  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloAction',  '_route' => 'acme_demo_secured_hello',);
  54.         }
  55.  
  56.         // _demo_secured_hello
  57.         if (0 === strpos($pathinfo, '/demo/secured/hello') && preg_match('#^/demo/secured/hello/(?P<name>[^/]+?)$#xs', $pathinfo, $matches)) {
  58.             return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloAction',)), array('_route' => '_demo_secured_hello'));
  59.         }
  60.  
  61.         // _demo_secured_hello_admin
  62.         if (0 === strpos($pathinfo, '/demo/secured/hello/admin') && preg_match('#^/demo/secured/hello/admin/(?P<name>[^/]+?)$#xs', $pathinfo, $matches)) {
  63.             return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloadminAction',)), array('_route' => '_demo_secured_hello_admin'));
  64.         }
  65.  
  66.         if (0 === strpos($pathinfo, '/demo')) {
  67.             // _demo
  68.             if (rtrim($pathinfo, '/') === '/demo') {
  69.                 if (substr($pathinfo, -1) !== '/') {
  70.                     return $this->redirect($pathinfo.'/', '_demo');
  71.                 }
  72.                 return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::indexAction',  '_route' => '_demo',);
  73.             }
  74.  
  75.             // _demo_hello
  76.             if (0 === strpos($pathinfo, '/demo/hello') && preg_match('#^/demo/hello/(?P<name>[^/]+?)$#xs', $pathinfo, $matches)) {
  77.                 return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::helloAction',)), array('_route' => '_demo_hello'));
  78.             }
  79.  
  80.             // _demo_contact
  81.             if ($pathinfo === '/demo/contact') {
  82.                 return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::contactAction',  '_route' => '_demo_contact',);
  83.             }
  84.  
  85.         }
  86.  
  87.         // _wdt
  88.         if (preg_match('#^/_wdt/(?P<token>[^/]+?)$#xs', $pathinfo, $matches)) {
  89.             return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::toolbarAction',)), array('_route' => '_wdt'));
  90.         }
  91.  
  92.         if (0 === strpos($pathinfo, '/_profiler')) {
  93.             // _profiler_search
  94.             if ($pathinfo === '/_profiler/search') {
  95.                 return array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::searchAction',  '_route' => '_profiler_search',);
  96.             }
  97.  
  98.             // _profiler_purge
  99.             if ($pathinfo === '/_profiler/purge') {
  100.                 return array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::purgeAction',  '_route' => '_profiler_purge',);
  101.             }
  102.  
  103.             // _profiler_import
  104.             if ($pathinfo === '/_profiler/import') {
  105.                 return array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::importAction',  '_route' => '_profiler_import',);
  106.             }
  107.  
  108.             // _profiler_export
  109.             if (0 === strpos($pathinfo, '/_profiler/export') && preg_match('#^/_profiler/export/(?P<token>[^/\\.]+?)\\.txt$#xs', $pathinfo, $matches)) {
  110.                 return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::exportAction',)), array('_route' => '_profiler_export'));
  111.             }
  112.  
  113.             // _profiler_search_results
  114.             if (preg_match('#^/_profiler/(?P<token>[^/]+?)/search/results$#xs', $pathinfo, $matches)) {
  115.                 return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::searchResultsAction',)), array('_route' => '_profiler_search_results'));
  116.             }
  117.  
  118.             // _profiler
  119.             if (preg_match('#^/_profiler/(?P<token>[^/]+?)$#xs', $pathinfo, $matches)) {
  120.                 return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Symfony\\Bundle\\WebProfilerBundle\\Controller\\ProfilerController::panelAction',)), array('_route' => '_profiler'));
  121.             }
  122.  
  123.         }
  124.  
  125.         if (0 === strpos($pathinfo, '/_configurator')) {
  126.             // _configurator_home
  127.             if (rtrim($pathinfo, '/') === '/_configurator') {
  128.                 if (substr($pathinfo, -1) !== '/') {
  129.                     return $this->redirect($pathinfo.'/', '_configurator_home');
  130.                 }
  131.                 return array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::checkAction',  '_route' => '_configurator_home',);
  132.             }
  133.  
  134.             // _configurator_step
  135.             if (0 === strpos($pathinfo, '/_configurator/step') && preg_match('#^/_configurator/step/(?P<index>[^/]+?)$#xs', $pathinfo, $matches)) {
  136.                 return array_merge($this->mergeDefaults($matches, array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::stepAction',)), array('_route' => '_configurator_step'));
  137.             }
  138.  
  139.             // _configurator_final
  140.             if ($pathinfo === '/_configurator/final') {
  141.                 return array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::finalAction',  '_route' => '_configurator_final',);
  142.             }
  143.  
  144.         }
  145.  
  146.         throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
  147.     }
  148. }
  149.  
  150.  
Advertisement
Add Comment
Please, Sign In to add comment