PHP Class Yosymfony\Spress\HttpServer\ServerResponse

Author: Victor Puertas ([email protected])
Afficher le fichier Open project: spress/spress Class Usage Examples

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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() public méthode

Get the content of the response.
public getContent ( ) : string
Résultat string

getContentType() public méthode

Get the MIME type.
public getContentType ( ) : string
Résultat string

getStatusCode() public méthode

Get the status code.
public getStatusCode ( ) : integer
Résultat integer

setContent() public méthode

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

setContentType() public méthode

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

setStatusCode() public méthode

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