Метод |
Описание |
|
__call ( string $method, array $parameters ) : mixed |
Call magic methods beginning with "with". |
|
__construct ( Dingo\Api\Transformer\Factory $transformer ) : void |
Create a new response factory instance. |
|
accepted ( null | string $location = null, mixed $content = null ) : Response |
Respond with an accepted response and associate a location and/or content if provided. |
|
collection ( Collection $collection, object $transformer, array | Closure $parameters = [], Closure $after = null ) : Response |
Bind a collection to a transformer and start building a response. |
|
created ( null | string $location = null, $content = null ) : Response |
Respond with a created response and associate a location if provided. |
|
error ( string $message, integer $statusCode ) : void |
Return an error response. |
|
errorBadRequest ( string $message = 'Bad Request' ) : void |
Return a 400 bad request error. |
|
errorForbidden ( string $message = 'Forbidden' ) : void |
Return a 403 forbidden error. |
|
errorInternal ( string $message = 'Internal Error' ) : void |
Return a 500 internal server error. |
|
errorMethodNotAllowed ( string $message = 'Method Not Allowed' ) : void |
Return a 405 method not allowed error. |
|
errorNotFound ( string $message = 'Not Found' ) : void |
Return a 404 not found error. |
|
errorUnauthorized ( string $message = 'Unauthorized' ) : void |
Return a 401 unauthorized error. |
|
item ( object $item, object $transformer, array $parameters = [], Closure $after = null ) : Response |
Bind an item to a transformer and start building a response. |
|
noContent ( ) : Response |
Respond with a no content response. |
|
paginator ( Illuminate\Contracts\Pagination\Paginator $paginator, object $transformer, array $parameters = [], Closure $after = null ) : Response |
Bind a paginator to a transformer and start building a response. |
|