ApiPlatform\Core\EventListener\AddFormatListener::getNotAcceptableHttpException PHP Method

getNotAcceptableHttpException() private method

Retrieves an instance of NotAcceptableHttpException.
private getNotAcceptableHttpException ( string $accept, array $mimeTypes = null ) : Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException
$accept string
$mimeTypes array
return Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException
    private function getNotAcceptableHttpException(string $accept, array $mimeTypes = null) : NotAcceptableHttpException
    {
        if (null === $mimeTypes) {
            $mimeTypes = array_keys($this->mimeTypes);
        }
        return new NotAcceptableHttpException(sprintf('Requested format "%s" is not supported. Supported MIME types are "%s".', $accept, implode('", "', $mimeTypes)));
    }