Property | Type | Description | |
---|---|---|---|
$errors | WoohooLabs\Yin\JsonApi\Schema\Error[] |
Method | 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 |
Method | Description | |
---|---|---|
getResponseCode ( integer $responseCode ) : integer |
public addError ( WoohooLabs\Yin\JsonApi\Schema\Error $error ) | ||
$error | WoohooLabs\Yin\JsonApi\Schema\Error |
public getErrors ( ) : WoohooLabs\Yin\JsonApi\Schema\Error[] | ||
return | WoohooLabs\Yin\JsonApi\Schema\Error[] |
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 | |
return | Psr\Http\Message\ResponseInterface |
protected getResponseCode ( integer $responseCode ) : integer | ||
$responseCode | integer | |
return | integer |
public transformContent ( array $additionalMeta = [] ) : array | ||
$additionalMeta | array | |
return | array |