Class Response
A response to a HTTP request.
- ICanBoogie\HTTP\Response implements ICanBoogie\HTTP\ResponseStatus 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
|
Constants summary
Constants inherited from ICanBoogie\HTTP\ResponseStatus
STATUS_ACCEPTED
,
STATUS_BAD_GATEWAY
,
STATUS_BAD_REQUEST
,
STATUS_CONFLICT
,
STATUS_CONTINUE
,
STATUS_CREATED
,
STATUS_EXPECTATION_FAILED
,
STATUS_FORBIDDEN
,
STATUS_FOUND
,
STATUS_GATEWAY_TIMEOUT
,
STATUS_GONE
,
STATUS_HTTP_VERSION_NOT_SUPPORTED
,
STATUS_INTERNAL_SERVER_ERROR
,
STATUS_I_M_A_TEAPOT
,
STATUS_LENGTH_REQUIRED
,
STATUS_METHOD_NOT_ALLOWED
,
STATUS_MOVED_PERMANENTLY
,
STATUS_MULTIPLE_CHOICES
,
STATUS_NON_AUTHORITATIVE_INFORMATION
,
STATUS_NOT_ACCEPTABLE
,
STATUS_NOT_FOUND
,
STATUS_NOT_IMPLEMENTED
,
STATUS_NOT_MODIFIED
,
STATUS_NO_CONTENT
,
STATUS_OK
,
STATUS_PARTIAL_CONTENT
,
STATUS_PAYMENT_REQUIRED
,
STATUS_PRECONDITION_FAILED
,
STATUS_PROXY_AUTHENTICATION_REQUIRED
,
STATUS_REQUESTED_RANGE_NOT_SATISFIABLE
,
STATUS_REQUEST_ENTITY_TOO_LARGE
,
STATUS_REQUEST_TIMEOUT
,
STATUS_REQUEST_URI_TOO_LONG
,
STATUS_RESET_CONTENT
,
STATUS_SEE_OTHER
,
STATUS_SERVICE_UNAVAILABLE
,
STATUS_SWITCHING_PROTOCOLS
,
STATUS_TEMPORARY_REDIRECT
,
STATUS_UNAUTHORIZED
,
STATUS_UNSUPPORTED_MEDIA_TYPE
,
STATUS_USE_PROXY
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 |