context = $context; } public function match($rawPathinfo) { $allow = array(); $pathinfo = rawurldecode($rawPathinfo); $context = $this->context; $request = $this->request ?: $this->createRequest($pathinfo); // mailjet.save if ('/admin/module/Mailjet' === $pathinfo) { if ($this->context->getMethod() != 'POST') { $allow[] = 'POST'; goto not_mailjetsave; } return array ( '_controller' => 'Mailjet\\Controller\\MailjetConfigController::saveAction', '_route' => 'mailjet.save',); } not_mailjetsave: throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException(); } }