protected handleNotAllowed ( array $allowed ) : Orno\Http\ResponseInterface | ||
$allowed | array | |
Résultat | Orno\Http\ResponseInterface |
protected function handleNotAllowed(array $allowed)
{
$exception = new HttpException\MethodNotAllowedException($allowed);
if ($this->getStrategy() === RouteStrategyInterface::RESTFUL_STRATEGY) {
return $exception->getJsonResponse();
}
throw $exception;
}