/var/cache/dev/appDevUrlMatcher.php

https://gitlab.com/jeisoncg/personal_collection_mv · PHP · 185 lines · 121 code · 36 blank · 28 comment · 36 complexity · d7fe6cbcc05b03fc3206face2b00eb95 MD5 · raw file

  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 = rawurldecode($pathinfo);
  24. $context = $this->context;
  25. $request = $this->request;
  26. if (0 === strpos($pathinfo, '/_')) {
  27. // _wdt
  28. if (0 === strpos($pathinfo, '/_wdt') && preg_match('#^/_wdt/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
  29. return $this->mergeDefaults(array_replace($matches, array('_route' => '_wdt')), array ( '_controller' => 'web_profiler.controller.profiler:toolbarAction',));
  30. }
  31. if (0 === strpos($pathinfo, '/_profiler')) {
  32. // _profiler_home
  33. if (rtrim($pathinfo, '/') === '/_profiler') {
  34. if (substr($pathinfo, -1) !== '/') {
  35. return $this->redirect($pathinfo.'/', '_profiler_home');
  36. }
  37. return array ( '_controller' => 'web_profiler.controller.profiler:homeAction', '_route' => '_profiler_home',);
  38. }
  39. if (0 === strpos($pathinfo, '/_profiler/search')) {
  40. // _profiler_search
  41. if ($pathinfo === '/_profiler/search') {
  42. return array ( '_controller' => 'web_profiler.controller.profiler:searchAction', '_route' => '_profiler_search',);
  43. }
  44. // _profiler_search_bar
  45. if ($pathinfo === '/_profiler/search_bar') {
  46. return array ( '_controller' => 'web_profiler.controller.profiler:searchBarAction', '_route' => '_profiler_search_bar',);
  47. }
  48. }
  49. // _profiler_info
  50. if (0 === strpos($pathinfo, '/_profiler/info') && preg_match('#^/_profiler/info/(?P<about>[^/]++)$#s', $pathinfo, $matches)) {
  51. return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_info')), array ( '_controller' => 'web_profiler.controller.profiler:infoAction',));
  52. }
  53. // _profiler_phpinfo
  54. if ($pathinfo === '/_profiler/phpinfo') {
  55. return array ( '_controller' => 'web_profiler.controller.profiler:phpinfoAction', '_route' => '_profiler_phpinfo',);
  56. }
  57. // _profiler_search_results
  58. if (preg_match('#^/_profiler/(?P<token>[^/]++)/search/results$#s', $pathinfo, $matches)) {
  59. return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_search_results')), array ( '_controller' => 'web_profiler.controller.profiler:searchResultsAction',));
  60. }
  61. // _profiler
  62. if (preg_match('#^/_profiler/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
  63. return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler')), array ( '_controller' => 'web_profiler.controller.profiler:panelAction',));
  64. }
  65. // _profiler_router
  66. if (preg_match('#^/_profiler/(?P<token>[^/]++)/router$#s', $pathinfo, $matches)) {
  67. return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_router')), array ( '_controller' => 'web_profiler.controller.router:panelAction',));
  68. }
  69. // _profiler_exception
  70. if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception$#s', $pathinfo, $matches)) {
  71. return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception')), array ( '_controller' => 'web_profiler.controller.exception:showAction',));
  72. }
  73. // _profiler_exception_css
  74. if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception\\.css$#s', $pathinfo, $matches)) {
  75. return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception_css')), array ( '_controller' => 'web_profiler.controller.exception:cssAction',));
  76. }
  77. }
  78. // _twig_error_test
  79. if (0 === strpos($pathinfo, '/_error') && preg_match('#^/_error/(?P<code>\\d+)(?:\\.(?P<_format>[^/]++))?$#s', $pathinfo, $matches)) {
  80. return $this->mergeDefaults(array_replace($matches, array('_route' => '_twig_error_test')), array ( '_controller' => 'twig.controller.preview_error:previewErrorPageAction', '_format' => 'html',));
  81. }
  82. }
  83. if (0 === strpos($pathinfo, '/usuarios')) {
  84. // usuarios_index
  85. if (rtrim($pathinfo, '/') === '/usuarios') {
  86. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  87. $allow = array_merge($allow, array('GET', 'HEAD'));
  88. goto not_usuarios_index;
  89. }
  90. if (substr($pathinfo, -1) !== '/') {
  91. return $this->redirect($pathinfo.'/', 'usuarios_index');
  92. }
  93. return array ( '_controller' => 'TinkerSoft\\UsuariosBundle\\Controller\\UsuariosController::indexAction', '_route' => 'usuarios_index',);
  94. }
  95. not_usuarios_index:
  96. // usuarios_show
  97. if (preg_match('#^/usuarios/(?P<id>[^/]++)/show$#s', $pathinfo, $matches)) {
  98. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  99. $allow = array_merge($allow, array('GET', 'HEAD'));
  100. goto not_usuarios_show;
  101. }
  102. return $this->mergeDefaults(array_replace($matches, array('_route' => 'usuarios_show')), array ( '_controller' => 'TinkerSoft\\UsuariosBundle\\Controller\\UsuariosController::showAction',));
  103. }
  104. not_usuarios_show:
  105. // usuarios_new
  106. if ($pathinfo === '/usuarios/new') {
  107. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  108. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  109. goto not_usuarios_new;
  110. }
  111. return array ( '_controller' => 'TinkerSoft\\UsuariosBundle\\Controller\\UsuariosController::newAction', '_route' => 'usuarios_new',);
  112. }
  113. not_usuarios_new:
  114. // usuarios_edit
  115. if (preg_match('#^/usuarios/(?P<id>[^/]++)/edit$#s', $pathinfo, $matches)) {
  116. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  117. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  118. goto not_usuarios_edit;
  119. }
  120. return $this->mergeDefaults(array_replace($matches, array('_route' => 'usuarios_edit')), array ( '_controller' => 'TinkerSoft\\UsuariosBundle\\Controller\\UsuariosController::editAction',));
  121. }
  122. not_usuarios_edit:
  123. // usuarios_delete
  124. if (preg_match('#^/usuarios/(?P<id>[^/]++)/delete$#s', $pathinfo, $matches)) {
  125. if ($this->context->getMethod() != 'DELETE') {
  126. $allow[] = 'DELETE';
  127. goto not_usuarios_delete;
  128. }
  129. return $this->mergeDefaults(array_replace($matches, array('_route' => 'usuarios_delete')), array ( '_controller' => 'TinkerSoft\\UsuariosBundle\\Controller\\UsuariosController::deleteAction',));
  130. }
  131. not_usuarios_delete:
  132. }
  133. // tinker_soft_usuarios_homepage
  134. if (rtrim($pathinfo, '/') === '') {
  135. if (substr($pathinfo, -1) !== '/') {
  136. return $this->redirect($pathinfo.'/', 'tinker_soft_usuarios_homepage');
  137. }
  138. return array ( '_controller' => 'TinkerSoft\\UsuariosBundle\\Controller\\DefaultController::indexAction', '_route' => 'tinker_soft_usuarios_homepage',);
  139. }
  140. // homepage
  141. if (rtrim($pathinfo, '/') === '') {
  142. if (substr($pathinfo, -1) !== '/') {
  143. return $this->redirect($pathinfo.'/', 'homepage');
  144. }
  145. return array ( '_controller' => 'AppBundle\\Controller\\DefaultController::indexAction', '_route' => 'homepage',);
  146. }
  147. throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
  148. }
  149. }