ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This class represents a single HTTP response. More...
Public Member Functions | |
__construct ($status=null, array $headers=null, $body=null) | |
Creates the response object. More... | |
getStatus () | |
Returns the current HTTP status code. More... | |
getStatusText () | |
Returns the human-readable status string. More... | |
setStatus ($status) | |
Sets the HTTP status code. More... | |
__toString () | |
Serializes the response object as a string. More... | |
Public Member Functions inherited from Sabre\HTTP\Message | |
getBodyAsStream () | |
Returns the body as a readable stream resource. More... | |
getBodyAsString () | |
Returns the body as a string. More... | |
getBody () | |
Returns the message body, as it's internal representation. More... | |
setBody ($body) | |
Replaces the body resource with a new stream or string. More... | |
getHeaders () | |
Returns all the HTTP headers as an array. More... | |
hasHeader ($name) | |
Will return true or false, depending on if a HTTP header exists. More... | |
getHeader ($name) | |
Returns a specific HTTP header, based on it's name. More... | |
getHeaderAsArray ($name) | |
Returns a HTTP header as an array. More... | |
setHeader ($name, $value) | |
Updates a HTTP header. More... | |
setHeaders (array $headers) | |
Sets a new set of HTTP headers. More... | |
addHeader ($name, $value) | |
Adds a HTTP header. More... | |
addHeaders (array $headers) | |
Adds a new set of HTTP headers. More... | |
removeHeader ($name) | |
Removes a HTTP header. More... | |
setHttpVersion ($version) | |
Sets the HTTP version. More... | |
getHttpVersion () | |
Returns the HTTP version. More... | |
Static Public Attributes | |
static | $statusCodes |
Protected Attributes | |
$status | |
$statusText | |
Protected Attributes inherited from Sabre\HTTP\Message | |
$body | |
$headers = [] | |
$httpVersion = '1.1' | |
This class represents a single HTTP response.
Definition at line 12 of file Response.php.
Sabre\HTTP\Response::__construct | ( | $status = null , |
|
array | $headers = null , |
||
$body = null |
|||
) |
Creates the response object.
string | int | $status | |
array | $headers | |
resource | $body |
Definition at line 104 of file Response.php.
References Sabre\HTTP\Message\$body, Sabre\HTTP\Message\$headers, Sabre\HTTP\Response\$status, Sabre\HTTP\Message\setBody(), Sabre\HTTP\Message\setHeaders(), and Sabre\HTTP\Response\setStatus().
Sabre\HTTP\Response::__toString | ( | ) |
Serializes the response object as a string.
This is useful for debugging purposes.
Definition at line 179 of file Response.php.
References $key, Sabre\HTTP\Message\getBodyAsString(), Sabre\HTTP\Message\getHeaders(), Sabre\HTTP\Response\getStatus(), and Sabre\HTTP\Response\getStatusText().
Sabre\HTTP\Response::getStatus | ( | ) |
Returns the current HTTP status code.
Implements Sabre\HTTP\ResponseInterface.
Definition at line 118 of file Response.php.
References Sabre\HTTP\Response\$status.
Referenced by Sabre\HTTP\Response\__toString().
Sabre\HTTP\Response::getStatusText | ( | ) |
Returns the human-readable status string.
In the case of a 200, this may for example be 'OK'.
Implements Sabre\HTTP\ResponseInterface.
Definition at line 131 of file Response.php.
References Sabre\HTTP\Response\$statusText.
Referenced by Sabre\HTTP\Response\__toString().
Sabre\HTTP\Response::setStatus | ( | $status | ) |
Sets the HTTP status code.
This can be either the full HTTP status code with human readable string, for example: "403 I can't let you do that, Dave".
Or just the code, in which case the appropriate default message will be added.
string | int | $status |
Implements Sabre\HTTP\ResponseInterface.
Definition at line 150 of file Response.php.
References Sabre\HTTP\Response\$status, and Sabre\HTTP\Response\$statusText.
Referenced by Sabre\HTTP\Response\__construct().
|
protected |
Definition at line 88 of file Response.php.
Referenced by Sabre\HTTP\Response\__construct(), Sabre\HTTP\Response\getStatus(), and Sabre\HTTP\Response\setStatus().
|
static |
Definition at line 19 of file Response.php.
Referenced by Sabre\DAV\Xml\Element\Response\xmlSerialize().
|
protected |
Definition at line 95 of file Response.php.
Referenced by Sabre\HTTP\Response\getStatusText(), and Sabre\HTTP\Response\setStatus().