PHP Class Dietcube\Response

Inheritance: use trait Dietcube\Components\LoggerAwareTrait
Mostrar archivo Open project: mercari/dietcube Class Usage Examples

Protected Properties

Property Type Description
$body null | string
$headers
$reason_phrase null | string
$status_code integer

Public Methods

Method 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 method

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

getBody() public method

public getBody ( ) : string | null
return string | null

getReasonPhrase() public method

public getReasonPhrase ( ) : string
return string

getStatusCode() public method

public getStatusCode ( ) : integer
return integer

sendBody() public method

public sendBody ( )

sendHeaders() public method

public sendHeaders ( )

sendHttpHeader() public method

public sendHttpHeader ( )

setBody() public method

public setBody ( $body )

setHeader() public method

public setHeader ( $header, $value )

setHeaders() public method

public setHeaders ( array $headers )
$headers array

setReasonPhrase() public method

public setReasonPhrase ( $phrase = null )

setStatusCode() public method

public setStatusCode ( $status_code )

Property Details

$body protected_oe property

protected null|string $body
return null | string

$headers protected_oe property

protected $headers

$reason_phrase protected_oe property

protected null|string $reason_phrase
return null | string

$status_code protected_oe property

protected int $status_code
return integer