94 lines
3.5 KiB
PHP
94 lines
3.5 KiB
PHP
<?php
|
|
|
|
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
|
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
|
use Symfony\Component\Routing\RequestContext;
|
|
|
|
/**
|
|
* ProjectUrlMatcherIciRelais.
|
|
*
|
|
* This class has been auto-generated
|
|
* by the Symfony Routing Component.
|
|
*/
|
|
class ProjectUrlMatcherIciRelais extends Symfony\Component\Routing\Matcher\UrlMatcher
|
|
{
|
|
/**
|
|
* Constructor.
|
|
*/
|
|
public function __construct(RequestContext $context)
|
|
{
|
|
$this->context = $context;
|
|
}
|
|
|
|
public function match($pathinfo)
|
|
{
|
|
$allow = array();
|
|
$pathinfo = rawurldecode($pathinfo);
|
|
$context = $this->context;
|
|
$request = $this->request;
|
|
|
|
// icirelais.searchroute
|
|
if (0 === strpos($pathinfo, '/module/icirelais') && preg_match('#^/module/icirelais/(?P<zipcode>\\d{5})/(?P<city>.+)$#s', $pathinfo, $matches)) {
|
|
if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
|
|
$allow = array_merge($allow, array('GET', 'HEAD'));
|
|
goto not_icirelaissearchroute;
|
|
}
|
|
|
|
return $this->mergeDefaults(array_replace($matches, array('_route' => 'icirelais.searchroute')), array ( '_controller' => 'IciRelais\\Controller\\SearchCityController::searchAction',));
|
|
}
|
|
not_icirelaissearchroute:
|
|
|
|
if (0 === strpos($pathinfo, '/admin/module/icirelais')) {
|
|
if (0 === strpos($pathinfo, '/admin/module/icirelais/export')) {
|
|
// icirelais.export
|
|
if ($pathinfo === '/admin/module/icirelais/exportgo') {
|
|
if ($this->context->getMethod() != 'POST') {
|
|
$allow[] = 'POST';
|
|
goto not_icirelaisexport;
|
|
}
|
|
|
|
return array ( '_controller' => 'IciRelais\\Controller\\Export::exportfile', '_route' => 'icirelais.export',);
|
|
}
|
|
not_icirelaisexport:
|
|
|
|
// icirelais.export.exaprint
|
|
if ($pathinfo === '/admin/module/icirelais/export') {
|
|
if ($this->context->getMethod() != 'POST') {
|
|
$allow[] = 'POST';
|
|
goto not_icirelaisexportexaprint;
|
|
}
|
|
|
|
return array ( '_controller' => 'IciRelais\\Controller\\ExportExaprint::export', '_route' => 'icirelais.export.exaprint',);
|
|
}
|
|
not_icirelaisexportexaprint:
|
|
|
|
}
|
|
|
|
// icirelais.edit.prices
|
|
if ($pathinfo === '/admin/module/icirelais/prices') {
|
|
if ($this->context->getMethod() != 'POST') {
|
|
$allow[] = 'POST';
|
|
goto not_icirelaiseditprices;
|
|
}
|
|
|
|
return array ( '_controller' => 'IciRelais\\Controller\\EditPrices::editprices', '_route' => 'icirelais.edit.prices',);
|
|
}
|
|
not_icirelaiseditprices:
|
|
|
|
// icirelais.edit.freeshipping
|
|
if ($pathinfo === '/admin/module/icirelais/freeshipping') {
|
|
if ($this->context->getMethod() != 'POST') {
|
|
$allow[] = 'POST';
|
|
goto not_icirelaiseditfreeshipping;
|
|
}
|
|
|
|
return array ( '_controller' => 'IciRelais\\Controller\\FreeShipping::set', '_route' => 'icirelais.edit.freeshipping',);
|
|
}
|
|
not_icirelaiseditfreeshipping:
|
|
|
|
}
|
|
|
|
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
|
}
|
|
}
|