Метод |
Описание |
|
__construct ( League\Fractal\Manager $manager ) |
|
|
errorForbidden ( string $message = 'Forbidden', array $headers = [] ) : mixed |
Generates a response with a 403 HTTP header and a given message. |
|
errorGone ( string $message = 'Resource No Longer Available', array $headers = [] ) : mixed |
Generates a response with a 410 HTTP header and a given message. |
|
errorInternalError ( string $message = 'Internal Error', array $headers = [] ) : mixed |
Generates a response with a 500 HTTP header and a given message. |
|
errorMethodNotAllowed ( string $message = 'Method Not Allowed', array $headers = [] ) : mixed |
Generates a response with a 405 HTTP header and a given message. |
|
errorNotFound ( string $message = 'Resource Not Found', array $headers = [] ) : mixed |
Generates a response with a 404 HTTP header and a given message. |
|
errorUnauthorized ( string $message = 'Unauthorized', array $headers = [] ) : mixed |
Generates a response with a 401 HTTP header and a given message. |
|
errorUnprocessable ( string $message = 'Unprocessable Entity', array $headers = [] ) : mixed |
Generates a Response with a 422 HTTP header and a given message. |
|
errorUnwillingToProcess ( string $message = 'Server is unwilling to process the request', array $headers = [] ) : mixed |
Generates a Response with a 431 HTTP header and a given message. |
|
errorWrongArgs ( string $message = 'Wrong Arguments', array $headers = [] ) : mixed |
Generates a response with a 400 HTTP header and a given message. |
|
getManager ( ) : League\Fractal\Manager |
|
|
getStatusCode ( ) : integer |
Getter for statusCode |
|
setStatusCode ( integer $statusCode ) : AbstractResponse |
Setter for status code |
|
withArray ( array $array, array $headers = [] ) |
Implement this !!!
This method return the final response output |
|
withCollection ( $data, callable | League\Fractal\TransformerAbstract $transformer, string $resourceKey = null, League\Fractal\Pagination\Cursor $cursor = null, array $meta = [], array $headers = [] ) : mixed |
Response for collection of items |
|
withError ( string $message, string $errorCode, array $headers = [] ) : mixed |
Response for errors |
|
withItem ( $data, callable | League\Fractal\TransformerAbstract $transformer, string $resourceKey = null, array $meta = [], array $headers = [] ) : mixed |
Response for one item |
|