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