PHP Class Dietcube\Response

Inheritance: use trait Dietcube\Components\LoggerAwareTrait
Afficher le fichier Open project: mercari/dietcube Class Usage Examples

Protected Properties

Свойство Type Description
$body null | string
$headers
$reason_phrase null | string
$status_code integer

Méthodes publiques

Méthode Description
__construct ( $status_code = 200, $headers = [], $body = null, $version = "1.1" )
getBody ( ) : string | null
getReasonPhrase ( ) : string
getStatusCode ( ) : integer
sendBody ( )
sendHeaders ( )
sendHttpHeader ( )
setBody ( $body )
setHeader ( $header, $value )
setHeaders ( array $headers )
setReasonPhrase ( $phrase = null )
setStatusCode ( $status_code )

Method Details

__construct() public méthode

public __construct ( $status_code = 200, $headers = [], $body = null, $version = "1.1" )

getBody() public méthode

public getBody ( ) : string | null
Résultat string | null

getReasonPhrase() public méthode

public getReasonPhrase ( ) : string
Résultat string

getStatusCode() public méthode

public getStatusCode ( ) : integer
Résultat integer

sendBody() public méthode

public sendBody ( )

sendHeaders() public méthode

public sendHeaders ( )

sendHttpHeader() public méthode

public sendHttpHeader ( )

setBody() public méthode

public setBody ( $body )

setHeader() public méthode

public setHeader ( $header, $value )

setHeaders() public méthode

public setHeaders ( array $headers )
$headers array

setReasonPhrase() public méthode

public setReasonPhrase ( $phrase = null )

setStatusCode() public méthode

public setStatusCode ( $status_code )

Property Details

$body protected_oe property

protected null|string $body
Résultat null | string

$headers protected_oe property

protected $headers

$reason_phrase protected_oe property

protected null|string $reason_phrase
Résultat null | string

$status_code protected_oe property

protected int $status_code
Résultat integer