Class Response
A response to a HTTP request.
- ICanBoogie\HTTP\Response uses ICanBoogie\Accessor\AccessorTrait (not available)
Direct known subclasses
ICanBoogie\HTTP\FileResponse
,
ICanBoogie\HTTP\RedirectResponse
Methods summary
public
|
#
__construct( mixed $body = null, integer|
Initializes the $body, $header, $date and $status properties. |
public
|
|
public
string
|
|
public
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
#
set_status( integer|
Sets response status code and optionally status message. |
protected
|
|
protected
|
|
protected
|
|
protected
string
|
|
protected
|
|
protected
string
|
|
protected
|
|
protected
|
|
protected
|
|
protected
integer
|
|
protected
|
|
protected
|
|
protected
|
|
protected
integer
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
string
|
|
protected
|
#
set_cache_control( string $cache_directives )
Sets the directives of the |
protected
|
|
protected
|
|
protected
integer|null
|
|
protected
boolean
|
#
get_is_validateable( )
Checks that the response includes header fields that can be used to validate the response with the origin server using a conditional GET request. |
protected
boolean
|
|
protected
boolean
|
Properties summary
public
|
$headers
Response headers. |
|
public
string
|
$version
The HTTP protocol version (1.0 or 1.1), defaults to '1.0' |
#
'1.0'
|
Magic properties
public
|
$status
|
public
mixed
|
$body
The body of the response. |
public
integer
|
$ttl
Adjusts the |
public
integer
|
$age
Shortcut to the |
public
|
$cache_control
Shortcut to the |
public
integer
|
$content_length
Shortcut to the |
public
|
$content_type
Shortcut to the |
public
|
$date
Shortcut to the |
public
string
|
$etag
Shortcut to the |
public
|
$expires
Shortcut to the |
public
|
$last_modified
Shortcut to the |
public
string
|
$location
Shortcut to the |
public read-only
boolean
|
$is_cacheable |
public read-only
boolean
|
$is_fresh |
public read-only
boolean
|
$is_private
get_is_private() |
public read-only
boolean
|
$is_validateable |