/PHP/Test/app/cache/dev/appdevUrlMatcher.php
https://bitbucket.org/AdriVanHoudt/school · PHP · 198 lines · 125 code · 40 blank · 33 comment · 41 complexity · 47e7e43dfac123f114a22a6c379ee9ea MD5 · raw file
- <?php
- use Symfony\Component\Routing\Exception\MethodNotAllowedException;
- use Symfony\Component\Routing\Exception\ResourceNotFoundException;
- use Symfony\Component\Routing\RequestContext;
- /**
- * appdevUrlMatcher
- *
- * This class has been auto-generated
- * by the Symfony Routing Component.
- */
- class appdevUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
- {
- /**
- * Constructor.
- */
- public function __construct(RequestContext $context)
- {
- $this->context = $context;
- }
- public function match($pathinfo)
- {
- $allow = array();
- $pathinfo = rawurldecode($pathinfo);
- 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 (rtrim($pathinfo, '/') === '/_profiler') {
- 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 ($pathinfo === '/_profiler/search') {
- return array ( '_controller' => 'web_profiler.controller.profiler:searchAction', '_route' => '_profiler_search',);
- }
- // _profiler_search_bar
- if ($pathinfo === '/_profiler/search_bar') {
- return array ( '_controller' => 'web_profiler.controller.profiler:searchBarAction', '_route' => '_profiler_search_bar',);
- }
- }
- // _profiler_purge
- if ($pathinfo === '/_profiler/purge') {
- return array ( '_controller' => 'web_profiler.controller.profiler:purgeAction', '_route' => '_profiler_purge',);
- }
- if (0 === strpos($pathinfo, '/_profiler/i')) {
- // _profiler_info
- if (0 === strpos($pathinfo, '/_profiler/info') && preg_match('#^/_profiler/info/(?P<about>[^/]++)$#s', $pathinfo, $matches)) {
- return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_info')), array ( '_controller' => 'web_profiler.controller.profiler:infoAction',));
- }
- // _profiler_import
- if ($pathinfo === '/_profiler/import') {
- return array ( '_controller' => 'web_profiler.controller.profiler:importAction', '_route' => '_profiler_import',);
- }
- }
- // _profiler_export
- if (0 === strpos($pathinfo, '/_profiler/export') && preg_match('#^/_profiler/export/(?P<token>[^/\\.]++)\\.txt$#s', $pathinfo, $matches)) {
- return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_export')), array ( '_controller' => 'web_profiler.controller.profiler:exportAction',));
- }
- // _profiler_phpinfo
- if ($pathinfo === '/_profiler/phpinfo') {
- 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
- 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',));
- }
- }
- if (0 === strpos($pathinfo, '/_configurator')) {
- // _configurator_home
- if (rtrim($pathinfo, '/') === '/_configurator') {
- if (substr($pathinfo, -1) !== '/') {
- return $this->redirect($pathinfo.'/', '_configurator_home');
- }
- return array ( '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::checkAction', '_route' => '_configurator_home',);
- }
- // _configurator_step
- if (0 === strpos($pathinfo, '/_configurator/step') && preg_match('#^/_configurator/step/(?P<index>[^/]++)$#s', $pathinfo, $matches)) {
- return $this->mergeDefaults(array_replace($matches, array('_route' => '_configurator_step')), array ( '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::stepAction',));
- }
- // _configurator_final
- if ($pathinfo === '/_configurator/final') {
- return array ( '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::finalAction', '_route' => '_configurator_final',);
- }
- }
- }
- if (0 === strpos($pathinfo, '/article')) {
- // article
- if (rtrim($pathinfo, '/') === '/article') {
- if (substr($pathinfo, -1) !== '/') {
- return $this->redirect($pathinfo.'/', 'article');
- }
- return array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::indexAction', '_route' => 'article',);
- }
- // article_show
- if (preg_match('#^/article/(?P<id>[^/]++)/show$#s', $pathinfo, $matches)) {
- return $this->mergeDefaults(array_replace($matches, array('_route' => 'article_show')), array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::showAction',));
- }
- // article_new
- if ($pathinfo === '/article/new') {
- return array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::newAction', '_route' => 'article_new',);
- }
- // article_create
- if ($pathinfo === '/article/create') {
- if ($this->context->getMethod() != 'POST') {
- $allow[] = 'POST';
- goto not_article_create;
- }
- return array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::createAction', '_route' => 'article_create',);
- }
- not_article_create:
- // article_edit
- if (preg_match('#^/article/(?P<id>[^/]++)/edit$#s', $pathinfo, $matches)) {
- return $this->mergeDefaults(array_replace($matches, array('_route' => 'article_edit')), array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::editAction',));
- }
- // article_update
- if (preg_match('#^/article/(?P<id>[^/]++)/update$#s', $pathinfo, $matches)) {
- if (!in_array($this->context->getMethod(), array('POST', 'PUT'))) {
- $allow = array_merge($allow, array('POST', 'PUT'));
- goto not_article_update;
- }
- return $this->mergeDefaults(array_replace($matches, array('_route' => 'article_update')), array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::updateAction',));
- }
- not_article_update:
- // article_delete
- if (preg_match('#^/article/(?P<id>[^/]++)/delete$#s', $pathinfo, $matches)) {
- if (!in_array($this->context->getMethod(), array('POST', 'DELETE'))) {
- $allow = array_merge($allow, array('POST', 'DELETE'));
- goto not_article_delete;
- }
- return $this->mergeDefaults(array_replace($matches, array('_route' => 'article_delete')), array ( '_controller' => 'Adri\\NewsBundle\\Controller\\ArticleController::deleteAction',));
- }
- not_article_delete:
- }
- throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
- }
- }