PHP Class Icicle\Http\Message\BasicResponse

Inheritance: extends AbstractMessage, implements Icicle\Http\Message\Response
Afficher le fichier Open project: icicleio/http Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( integer $code = 200, array $headers = [], Icicle\Stream\ReadableStream $stream = null, string $reason = null, string $protocol = '1.1' )
getCookie ( string $name )
getCookies ( ) : array
getReasonPhrase ( ) : string
getStatusCode ( ) : integer
hasCookie ( string $name ) : boolean
withAddedHeader ( string $name, $value ) : Icicle\Http\Message\Message
withCookie ( string $name, $value = '', integer $expires, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = false ) : Icicle\Http\Message\Response
withHeader ( string $name, $value ) : Icicle\Http\Message\Message
withStatus ( integer $code, string $reason = null ) : Icicle\Http\Message\Response
withoutCookie ( string $name ) : Icicle\Http\Message\Response
withoutHeader ( string $name ) : Icicle\Http\Message\Message

Méthodes protégées

Méthode Description
filterReason ( string $reason = null ) : string
validateStatusCode ( integer $code ) : integer

Private Methods

Méthode Description
setCookiesFromHeaders ( ) Sets cookies based on headers.
setHeadersFromCookies ( ) Sets headers based on cookie values.

Method Details

__construct() public méthode

public __construct ( integer $code = 200, array $headers = [], Icicle\Stream\ReadableStream $stream = null, string $reason = null, string $protocol = '1.1' )
$code integer Status code.
$headers array
$stream Icicle\Stream\ReadableStream
$reason string Status code reason.
$protocol string

filterReason() protected méthode

protected filterReason ( string $reason = null ) : string
$reason string
Résultat string

getCookie() public méthode

public getCookie ( string $name )
$name string

getCookies() public méthode

public getCookies ( ) : array
Résultat array

getReasonPhrase() public méthode

public getReasonPhrase ( ) : string
Résultat string

getStatusCode() public méthode

public getStatusCode ( ) : integer
Résultat integer

hasCookie() public méthode

public hasCookie ( string $name ) : boolean
$name string
Résultat boolean

validateStatusCode() protected méthode

protected validateStatusCode ( integer $code ) : integer
$code integer
Résultat integer

withAddedHeader() public méthode

public withAddedHeader ( string $name, $value ) : Icicle\Http\Message\Message
$name string
Résultat Icicle\Http\Message\Message

withCookie() public méthode

public withCookie ( string $name, $value = '', integer $expires, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = false ) : Icicle\Http\Message\Response
$name string
$expires integer
$path string
$domain string
$secure boolean
$httpOnly boolean
Résultat Icicle\Http\Message\Response

withHeader() public méthode

public withHeader ( string $name, $value ) : Icicle\Http\Message\Message
$name string
Résultat Icicle\Http\Message\Message

withStatus() public méthode

public withStatus ( integer $code, string $reason = null ) : Icicle\Http\Message\Response
$code integer
$reason string
Résultat Icicle\Http\Message\Response

withoutCookie() public méthode

public withoutCookie ( string $name ) : Icicle\Http\Message\Response
$name string
Résultat Icicle\Http\Message\Response

withoutHeader() public méthode

public withoutHeader ( string $name ) : Icicle\Http\Message\Message
$name string
Résultat Icicle\Http\Message\Message