39 lines
1.2 KiB
PHP
39 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
|
|
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
|
|
use Symfony\Component\Routing\RequestContext;
|
|
|
|
/**
|
|
* This class has been auto-generated
|
|
* by the Symfony Routing Component.
|
|
*/
|
|
class ProjectUrlMatcherHookSocial extends Symfony\Component\Routing\Matcher\UrlMatcher
|
|
{
|
|
public function __construct(RequestContext $context)
|
|
{
|
|
$this->context = $context;
|
|
}
|
|
|
|
public function match($rawPathinfo)
|
|
{
|
|
$allow = array();
|
|
$pathinfo = rawurldecode($rawPathinfo);
|
|
$context = $this->context;
|
|
$request = $this->request ?: $this->createRequest($pathinfo);
|
|
|
|
// hooksocial.configuration
|
|
if ('/admin/module/hooksocial/save' === $pathinfo) {
|
|
if ($this->context->getMethod() != 'POST') {
|
|
$allow[] = 'POST';
|
|
goto not_hooksocialconfiguration;
|
|
}
|
|
|
|
return array ( '_controller' => 'HookSocial\\Controller\\Configuration::saveAction', '_route' => 'hooksocial.configuration',);
|
|
}
|
|
not_hooksocialconfiguration:
|
|
|
|
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
|
|
}
|
|
}
|