PHP Класс Bluz\Cli\CliResponse

Allows creating a response by passing data to the constructor; by default, serializes the data to JSON, sets a status code of 200 and sets the Content-Type header to application/json.
Наследование: extends Zend\Diactoros\Response
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( mixed $data, integer $status = 200 ) Create a console response with the given data.

Приватные методы

Метод Описание
encode ( mixed $data ) : string Encode the provided data to JSON.

Описание методов

__construct() публичный Метод

Create a console response with the given data.
public __construct ( mixed $data, integer $status = 200 )
$data mixed Data to convert to string
$status integer Integer status code for the response; 200 by default.