Method | Description | |
---|---|---|
getCodeResponse ( integer $statusCode, array $headers = [] ) : mixed | Get response with HTTP code only. | |
getContentResponse ( object | array $data, integer $statusCode = self::HTTP_OK, array | null $links = null, mixed $meta = null, array $headers = [] ) : mixed | Get response with regular JSON API Document in body. | |
getCreatedResponse ( object $resource, array | null $links = null, mixed $meta = null, array $headers = [] ) : mixed | Get response for newly created resource with HTTP code 201 (adds 'location' header). | |
getErrorResponse ( Neomerx\JsonApi\Contracts\Document\ErrorInterface | Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | |
Get response with JSON API Error in body. | |
getIdentifiersResponse ( object | array $data, integer $statusCode = self::HTTP_OK, array | null $links = null, mixed $meta = null, array $headers = [] ) : mixed | Get response with only resource identifiers. | |
getMetaResponse ( array | object $meta, integer $statusCode = self::HTTP_OK, array $headers = [] ) : mixed | Get response with meta information only. |
public getErrorResponse ( Neomerx\JsonApi\Contracts\Document\ErrorInterface | Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | |
||
$errors | Neomerx\JsonApi\Contracts\Document\ErrorInterface | Neomerx\JsonApi\Contracts\Document\ErrorInterface[] | |
|
$statusCode | integer | |
$headers | array | |
return | mixed |