PHP Class blink\http\Response

Inheritance: extends blink\core\Object, implements blink\core\ShouldBeRefreshed, use trait blink\core\MiddlewareTrait
Afficher le fichier Open project: bixuehujin/blink Class Usage Examples

Méthodes publiques

Свойство Type Description
$data
$headers blink\http\HeaderBag
$httpStatuses
$statusCode
$statusText
$version

Protected Properties

Свойство Type Description
$content
$prepared

Méthodes publiques

Méthode Description
content ( ) : string Gets the raw response content.
getCookies ( ) : CookieBag Returns the cookies that should be sent with the response.
init ( )
prepare ( ) Prepare the response to ready to send to client.
redirect ( $url, integer $statusCode = 302 ) Redirects to the specified url.
status ( $code, $text = null )
with ( $data )

Method Details

content() public méthode

Gets the raw response content.
public content ( ) : string
Résultat string

getCookies() public méthode

Returns the cookies that should be sent with the response.
public getCookies ( ) : CookieBag
Résultat CookieBag

init() public méthode

public init ( )

prepare() public méthode

Prepare the response to ready to send to client.
public prepare ( )

redirect() public méthode

Redirects to the specified url.
Since: 0.2.0
public redirect ( $url, integer $statusCode = 302 )
$url The url to redirect
$statusCode integer

status() public méthode

public status ( $code, $text = null )

with() public méthode

public with ( $data )

Property Details

$content protected_oe property

protected $content

$data public_oe property

public $data

$headers public_oe property

public HeaderBag,blink\http $headers
Résultat blink\http\HeaderBag

$httpStatuses public_oe static_oe property

public static $httpStatuses

$prepared protected_oe property

protected $prepared

$statusCode public_oe property

public $statusCode

$statusText public_oe property

public $statusText

$version public_oe property

public $version