public __construct ( Symfony\Component\Serializer\SerializerInterface $serializer, array $errorFormats, array $exceptionToStatus = [] ) | ||
$serializer | Symfony\Component\Serializer\SerializerInterface | |
$errorFormats | array | A list of enabled formats, the first one will be the default |
$exceptionToStatus | array | A list of exceptions mapped to their HTTP status code |
public function __construct(SerializerInterface $serializer, array $errorFormats, array $exceptionToStatus = [])
{
$this->serializer = $serializer;
$this->errorFormats = $errorFormats;
$this->exceptionToStatus = $exceptionToStatus;
}