PHP Class blink\http\Response

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

Public Properties

Property Type Description
$data
$headers blink\http\HeaderBag
$httpStatuses
$statusCode
$statusText
$version

Protected Properties

Property Type Description
$content
$prepared

Public Methods

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

Gets the raw response content.
public content ( ) : string
return string

getCookies() public method

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

init() public method

public init ( )

prepare() public method

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

redirect() public method

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

status() public method

public status ( $code, $text = null )

with() public method

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
return 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