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(); } }