PHP Trait Api\StarterKit\Utils\ApiResponse

Inheritance: use trait Dingo\Api\Routing\Helpers
Afficher le fichier Open project: qijitech/api-starter-kit

Protected Properties

Свойство Type Description
$statusCode

Méthodes publiques

Méthode Description
getStatusCode ( ) : integer
respondBadMethod ( string $message = 'Bad Method!' ) : mixed
respondCreated ( $location = null ) : mixed
respondForbidden ( string $message = 'Forbidden!' ) : mixed
respondInternal ( string $message = 'Internal Server Error!' ) : mixed
respondMethodNotAllowed ( string $message = 'Method Not Allowed!' ) : mixed
respondNotFound ( string $message = 'Not Found!' ) : mixed
respondSuccess ( $message = 'Success' ) : mixed
respondUnprocessable ( $message ) : mixed
respondWithCollection ( Collection $data, League\Fractal\TransformerAbstract $transformer = null ) : mixed
respondWithItem ( $data, League\Fractal\TransformerAbstract $transformer = null ) : mixed
respondWithPagination ( Illuminate\Pagination\AbstractPaginator $paginator, League\Fractal\TransformerAbstract $transformer = null ) : mixed
setStatusCode ( integer $statusCode )

Private Methods

Méthode Description
getTransformer ( League\Fractal\TransformerAbstract $transformer = null ) : SimpleTransformer | League\Fractal\TransformerAbstract get transformer

Method Details

getStatusCode() public méthode

public getStatusCode ( ) : integer
Résultat integer

respondBadMethod() public méthode

public respondBadMethod ( string $message = 'Bad Method!' ) : mixed
$message string
Résultat mixed

respondCreated() public méthode

public respondCreated ( $location = null ) : mixed
$location
Résultat mixed

respondForbidden() public méthode

public respondForbidden ( string $message = 'Forbidden!' ) : mixed
$message string
Résultat mixed

respondInternal() public méthode

public respondInternal ( string $message = 'Internal Server Error!' ) : mixed
$message string
Résultat mixed

respondMethodNotAllowed() public méthode

public respondMethodNotAllowed ( string $message = 'Method Not Allowed!' ) : mixed
$message string
Résultat mixed

respondNotFound() public méthode

public respondNotFound ( string $message = 'Not Found!' ) : mixed
$message string
Résultat mixed

respondSuccess() public méthode

public respondSuccess ( $message = 'Success' ) : mixed
$message
Résultat mixed

respondUnprocessable() public méthode

public respondUnprocessable ( $message ) : mixed
$message
Résultat mixed

respondWithCollection() public méthode

public respondWithCollection ( Collection $data, League\Fractal\TransformerAbstract $transformer = null ) : mixed
$data Illuminate\Support\Collection
$transformer League\Fractal\TransformerAbstract
Résultat mixed

respondWithItem() public méthode

public respondWithItem ( $data, League\Fractal\TransformerAbstract $transformer = null ) : mixed
$data
$transformer League\Fractal\TransformerAbstract
Résultat mixed

respondWithPagination() public méthode

public respondWithPagination ( Illuminate\Pagination\AbstractPaginator $paginator, League\Fractal\TransformerAbstract $transformer = null ) : mixed
$paginator Illuminate\Pagination\AbstractPaginator
$transformer League\Fractal\TransformerAbstract
Résultat mixed

setStatusCode() public méthode

public setStatusCode ( integer $statusCode )
$statusCode integer

Property Details

$statusCode protected_oe property

protected $statusCode