PHP Класс Yosymfony\Spress\HttpServer\ServerResponse

Автор: Victor Puertas ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $content, integer $statusCode = 200, string $contentType = 'text/html' ) Constructor.
getContent ( ) : string Get the content of the response.
getContentType ( ) : string Get the MIME type.
getStatusCode ( ) : integer Get the status code.
setContent ( string $content ) Set the content of the response.
setContentType ( string $type ) Set the MIME type. e.g: 'text/html'.
setStatusCode ( integer $code ) Set the status code. e.g: 200 for ok response.

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

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

Constructor.
public __construct ( string $content, integer $statusCode = 200, string $contentType = 'text/html' )
$content string Content of the response
$statusCode integer The status code
$contentType string The MIME type

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

Get the content of the response.
public getContent ( ) : string
Результат string

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

Get the MIME type.
public getContentType ( ) : string
Результат string

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

Get the status code.
public getStatusCode ( ) : integer
Результат integer

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

Set the content of the response.
public setContent ( string $content )
$content string

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

Set the MIME type. e.g: 'text/html'.
public setContentType ( string $type )
$type string

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

Set the status code. e.g: 200 for ok response.
public setStatusCode ( integer $code )
$code integer