class Response implements JsonSerializable

Constants

HTTP_CONTINUE

HTTP_SWITCHING_PROTOCOLS

HTTP_PROCESSING

HTTP_OK

HTTP_CREATED

HTTP_ACCEPTED

HTTP_NON_AUTHORITATIVE_INFORMATION

HTTP_NO_CONTENT

HTTP_RESET_CONTENT

HTTP_PARTIAL_CONTENT

HTTP_MULTI_STATUS

HTTP_ALREADY_REPORTED

HTTP_IM_USED

HTTP_MULTIPLE_CHOICES

HTTP_MOVED_PERMANENTLY

HTTP_FOUND

HTTP_SEE_OTHER

HTTP_NOT_MODIFIED

HTTP_USE_PROXY

HTTP_RESERVED

HTTP_TEMPORARY_REDIRECT

HTTP_PERMANENTLY_REDIRECT

HTTP_BAD_REQUEST

HTTP_UNAUTHORIZED

HTTP_PAYMENT_REQUIRED

HTTP_FORBIDDEN

HTTP_NOT_FOUND

HTTP_METHOD_NOT_ALLOWED

HTTP_NOT_ACCEPTABLE

HTTP_PROXY_AUTHENTICATION_REQUIRED

HTTP_REQUEST_TIMEOUT

HTTP_CONFLICT

HTTP_GONE

HTTP_LENGTH_REQUIRED

HTTP_PRECONDITION_FAILED

HTTP_REQUEST_ENTITY_TOO_LARGE

HTTP_REQUEST_URI_TOO_LONG

HTTP_UNSUPPORTED_MEDIA_TYPE

HTTP_REQUESTED_RANGE_NOT_SATISFIABLE

HTTP_EXPECTATION_FAILED

HTTP_I_AM_A_TEAPOT

HTTP_MISDIRECTED_REQUEST

HTTP_UNPROCESSABLE_ENTITY

HTTP_LOCKED

HTTP_FAILED_DEPENDENCY

HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL

HTTP_UPGRADE_REQUIRED

HTTP_PRECONDITION_REQUIRED

HTTP_TOO_MANY_REQUESTS

HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE

HTTP_UNAVAILABLE_FOR_LEGAL_REASONS

HTTP_INTERNAL_SERVER_ERROR

HTTP_NOT_IMPLEMENTED

HTTP_BAD_GATEWAY

HTTP_SERVICE_UNAVAILABLE

HTTP_GATEWAY_TIMEOUT

HTTP_VERSION_NOT_SUPPORTED

HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL

HTTP_INSUFFICIENT_STORAGE

HTTP_LOOP_DETECTED

HTTP_NOT_EXTENDED

HTTP_NETWORK_AUTHENTICATION_REQUIRED

Properties

static array $statusTexts

Methods

__construct()

Response constructor.

mixed
get($property)

Get a value from the response given a property.

mixed
set($property, $value)

Set a given property on the response with the given value.

set_array(array $assoc_array)

Set an array of key value pairs on the response.

$this
push($data)

Push data onto the response as an indexed array.

$this
unshift($data)

Prepend data onto the response as an indexed array.

header($headerName, $value, bool $replacePrevious = TRUE)

Sets the response header.

string
__toString()

No description

array
jsonSerialize()

No description

Details

at line line 17
__construct()

Response constructor.

at line line 29
mixed get($property)

Get a value from the response given a property.

Parameters

$property

Return Value

mixed

at line line 41
mixed set($property, $value)

Set a given property on the response with the given value.

Parameters

$property
$value

Return Value

mixed

at line line 53
set_array(array $assoc_array)

Set an array of key value pairs on the response.

Parameters

array $assoc_array

at line line 68
$this push($data)

Push data onto the response as an indexed array.

Parameters

$data

Return Value

$this

at line line 82
$this unshift($data)

Prepend data onto the response as an indexed array.

Parameters

$data

Return Value

$this

at line line 96
header($headerName, $value, bool $replacePrevious = TRUE)

Sets the response header.

Parameters

$headerName
$value
bool $replacePrevious

at line line 104
string __toString()

Return Value

string

at line line 112
array jsonSerialize()

Return Value

array