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