context = $context; } public function match($rawPathinfo) { $allow = $allowSchemes = array(); $pathinfo = rawurldecode($rawPathinfo); $context = $this->context; $requestMethod = $canonicalMethod = $context->getMethod(); if ('HEAD' === $requestMethod) { $canonicalMethod = 'GET'; } if ('/' === $pathinfo && !$allow && !$allowSchemes) { throw new Symfony\Component\Routing\Exception\NoConfigurationException(); } throw $allow ? new MethodNotAllowedException(array_keys($allow)) : new ResourceNotFoundException(); } }