appdevUrlMatcher.php 7.2KB

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