PHP Class WoohooLabs\Yin\JsonApi\Document\AbstractErrorDocument

Inheritance: extends AbstractDocument
Afficher le fichier Open project: woohoolabs/yin Class Usage Examples

Protected Properties

Свойство Type Description
$errors WoohooLabs\Yin\JsonApi\Schema\Error[]

Méthodes publiques

Méthode Description
addError ( WoohooLabs\Yin\JsonApi\Schema\Error $error ) Includes a new error in the error document.
getErrors ( ) : WoohooLabs\Yin\JsonApi\Schema\Error[]
getResponse ( WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, Psr\Http\Message\ResponseInterface $response, integer $responseCode = null, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface Returns a response with a status code of $responseCode, containing all the provided sections of the error document. You can also pass additional meta information for the document in the $additionalMeta argument.
transformContent ( array $additionalMeta = [] ) : array

Méthodes protégées

Méthode Description
getResponseCode ( integer $responseCode ) : integer

Method Details

addError() public méthode

Includes a new error in the error document.
public addError ( WoohooLabs\Yin\JsonApi\Schema\Error $error )
$error WoohooLabs\Yin\JsonApi\Schema\Error

getErrors() public méthode

public getErrors ( ) : WoohooLabs\Yin\JsonApi\Schema\Error[]
Résultat WoohooLabs\Yin\JsonApi\Schema\Error[]

getResponse() public méthode

Returns a response with a status code of $responseCode, containing all the provided sections of the error document. You can also pass additional meta information for the document in the $additionalMeta argument.
public getResponse ( WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface $serializer, Psr\Http\Message\ResponseInterface $response, integer $responseCode = null, array $additionalMeta = [] ) : Psr\Http\Message\ResponseInterface
$serializer WoohooLabs\Yin\JsonApi\Serializer\SerializerInterface
$response Psr\Http\Message\ResponseInterface
$responseCode integer
$additionalMeta array
Résultat Psr\Http\Message\ResponseInterface

getResponseCode() protected méthode

protected getResponseCode ( integer $responseCode ) : integer
$responseCode integer
Résultat integer

transformContent() public méthode

public transformContent ( array $additionalMeta = [] ) : array
$additionalMeta array
Résultat array

Property Details

$errors protected_oe property

protected Error[],WoohooLabs\Yin\JsonApi\Schema $errors
Résultat WoohooLabs\Yin\JsonApi\Schema\Error[]