ApiPlatform\Core\Action\ExceptionAction::__construct PHP 메소드

__construct() 공개 메소드

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;
    }