getErrorResponse() публичный Метод

Get response with JSON API Error in body.
public getErrorResponse ( Neomerx\JsonApi\Contracts\Document\ErrorInterface | Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | ErrorCollection $errors, integer $statusCode = self::HTTP_BAD_REQUEST, array $headers = [] ) : mixed
$errors Neomerx\JsonApi\Contracts\Document\ErrorInterface | Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | Neomerx\JsonApi\Exceptions\ErrorCollection
$statusCode integer
$headers array
Результат mixed
Пример #1
0
 /**
  * @inheritdoc
  */
 public function errors(ErrorResponseInterface $errors)
 {
     return $this->responses->getErrorResponse($errors->getErrors(), $errors->getHttpCode(), $errors->getHeaders());
 }