/app/cache/prod/appProdUrlMatcher.php

https://gitlab.com/mohamedchiheb.bida/workshopFOS · PHP · 232 lines · 162 code · 45 blank · 25 comment · 45 complexity · 41c62832c000c50cf6a9573c99b4ab6d 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. * appProdUrlMatcher.
  7. *
  8. * This class has been auto-generated
  9. * by the Symfony Routing Component.
  10. */
  11. class appProdUrlMatcher 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. // my_app_user_homepage
  27. if (0 === strpos($pathinfo, '/hello') && preg_match('#^/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
  28. return $this->mergeDefaults(array_replace($matches, array('_route' => 'my_app_user_homepage')), array ( '_controller' => 'MyApp\\UserBundle\\Controller\\DefaultController::indexAction',));
  29. }
  30. // homepage
  31. if (rtrim($pathinfo, '/') === '') {
  32. if (substr($pathinfo, -1) !== '/') {
  33. return $this->redirect($pathinfo.'/', 'homepage');
  34. }
  35. return array ( '_controller' => 'AppBundle\\Controller\\DefaultController::indexAction', '_route' => 'homepage',);
  36. }
  37. if (0 === strpos($pathinfo, '/log')) {
  38. if (0 === strpos($pathinfo, '/login')) {
  39. // fos_user_security_login
  40. if ($pathinfo === '/login') {
  41. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  42. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  43. goto not_fos_user_security_login;
  44. }
  45. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::loginAction', '_route' => 'fos_user_security_login',);
  46. }
  47. not_fos_user_security_login:
  48. // fos_user_security_check
  49. if ($pathinfo === '/login_check') {
  50. if ($this->context->getMethod() != 'POST') {
  51. $allow[] = 'POST';
  52. goto not_fos_user_security_check;
  53. }
  54. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::checkAction', '_route' => 'fos_user_security_check',);
  55. }
  56. not_fos_user_security_check:
  57. }
  58. // fos_user_security_logout
  59. if ($pathinfo === '/logout') {
  60. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  61. $allow = array_merge($allow, array('GET', 'HEAD'));
  62. goto not_fos_user_security_logout;
  63. }
  64. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::logoutAction', '_route' => 'fos_user_security_logout',);
  65. }
  66. not_fos_user_security_logout:
  67. }
  68. if (0 === strpos($pathinfo, '/profile')) {
  69. // fos_user_profile_show
  70. if (rtrim($pathinfo, '/') === '/profile') {
  71. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  72. $allow = array_merge($allow, array('GET', 'HEAD'));
  73. goto not_fos_user_profile_show;
  74. }
  75. if (substr($pathinfo, -1) !== '/') {
  76. return $this->redirect($pathinfo.'/', 'fos_user_profile_show');
  77. }
  78. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::showAction', '_route' => 'fos_user_profile_show',);
  79. }
  80. not_fos_user_profile_show:
  81. // fos_user_profile_edit
  82. if ($pathinfo === '/profile/edit') {
  83. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  84. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  85. goto not_fos_user_profile_edit;
  86. }
  87. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::editAction', '_route' => 'fos_user_profile_edit',);
  88. }
  89. not_fos_user_profile_edit:
  90. }
  91. if (0 === strpos($pathinfo, '/re')) {
  92. if (0 === strpos($pathinfo, '/register')) {
  93. // fos_user_registration_register
  94. if (rtrim($pathinfo, '/') === '/register') {
  95. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  96. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  97. goto not_fos_user_registration_register;
  98. }
  99. if (substr($pathinfo, -1) !== '/') {
  100. return $this->redirect($pathinfo.'/', 'fos_user_registration_register');
  101. }
  102. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::registerAction', '_route' => 'fos_user_registration_register',);
  103. }
  104. not_fos_user_registration_register:
  105. if (0 === strpos($pathinfo, '/register/c')) {
  106. // fos_user_registration_check_email
  107. if ($pathinfo === '/register/check-email') {
  108. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  109. $allow = array_merge($allow, array('GET', 'HEAD'));
  110. goto not_fos_user_registration_check_email;
  111. }
  112. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::checkEmailAction', '_route' => 'fos_user_registration_check_email',);
  113. }
  114. not_fos_user_registration_check_email:
  115. if (0 === strpos($pathinfo, '/register/confirm')) {
  116. // fos_user_registration_confirm
  117. if (preg_match('#^/register/confirm/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
  118. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  119. $allow = array_merge($allow, array('GET', 'HEAD'));
  120. goto not_fos_user_registration_confirm;
  121. }
  122. return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_user_registration_confirm')), array ( '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmAction',));
  123. }
  124. not_fos_user_registration_confirm:
  125. // fos_user_registration_confirmed
  126. if ($pathinfo === '/register/confirmed') {
  127. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  128. $allow = array_merge($allow, array('GET', 'HEAD'));
  129. goto not_fos_user_registration_confirmed;
  130. }
  131. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmedAction', '_route' => 'fos_user_registration_confirmed',);
  132. }
  133. not_fos_user_registration_confirmed:
  134. }
  135. }
  136. }
  137. if (0 === strpos($pathinfo, '/resetting')) {
  138. // fos_user_resetting_request
  139. if ($pathinfo === '/resetting/request') {
  140. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  141. $allow = array_merge($allow, array('GET', 'HEAD'));
  142. goto not_fos_user_resetting_request;
  143. }
  144. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::requestAction', '_route' => 'fos_user_resetting_request',);
  145. }
  146. not_fos_user_resetting_request:
  147. // fos_user_resetting_send_email
  148. if ($pathinfo === '/resetting/send-email') {
  149. if ($this->context->getMethod() != 'POST') {
  150. $allow[] = 'POST';
  151. goto not_fos_user_resetting_send_email;
  152. }
  153. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::sendEmailAction', '_route' => 'fos_user_resetting_send_email',);
  154. }
  155. not_fos_user_resetting_send_email:
  156. // fos_user_resetting_check_email
  157. if ($pathinfo === '/resetting/check-email') {
  158. if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
  159. $allow = array_merge($allow, array('GET', 'HEAD'));
  160. goto not_fos_user_resetting_check_email;
  161. }
  162. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::checkEmailAction', '_route' => 'fos_user_resetting_check_email',);
  163. }
  164. not_fos_user_resetting_check_email:
  165. // fos_user_resetting_reset
  166. if (0 === strpos($pathinfo, '/resetting/reset') && preg_match('#^/resetting/reset/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
  167. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  168. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  169. goto not_fos_user_resetting_reset;
  170. }
  171. return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_user_resetting_reset')), array ( '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::resetAction',));
  172. }
  173. not_fos_user_resetting_reset:
  174. }
  175. }
  176. // fos_user_change_password
  177. if ($pathinfo === '/profile/change-password') {
  178. if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
  179. $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
  180. goto not_fos_user_change_password;
  181. }
  182. return array ( '_controller' => 'FOS\\UserBundle\\Controller\\ChangePasswordController::changePasswordAction', '_route' => 'fos_user_change_password',);
  183. }
  184. not_fos_user_change_password:
  185. throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
  186. }
  187. }