Method |
Description |
|
__construct ( Response $parentResponse = null ) |
Construct this Response |
|
__toString ( ) : string |
Cast the response to a string: return the content part of this response |
|
appendContent ( string $content ) : Response |
Appends content to the already existing content. |
|
createFromRaw ( string $rawResponse, Response $parentResponse = null ) : Response |
Creates a response from the given raw, that is plain text, HTTP response. |
|
getAge ( ) : integer |
Returns the age of this responds in seconds. |
|
getContent ( ) : string |
Returns the response content without sending it. |
|
getDate ( ) : DateTime |
Returns the date from the Date header. |
|
getExpires ( ) : DateTime |
Returns the date from the Expires header or NULL if no such header
is present. |
|
getLastModified ( ) : DateTime |
Returns the date from the Last-Modified header or NULL if no such header
is present. |
|
getMaximumAge ( ) : integer |
Returns the maximum age in seconds before this response becomes stale. |
|
getParentResponse ( ) : Response |
Return the parent response or NULL if none exists. |
|
getSharedMaximumAge ( ) : integer |
Returns the maximum age in seconds before this response becomes stale in shared
caches, such as proxies. |
|
getStartLine ( ) : string |
Returns the first line of this Response Message, which is the Status-Line in this case |
|
getStatus ( ) : string |
Returns status code and status message. |
|
getStatusCode ( ) : integer |
Returns the status code. |
|
getStatusLine ( ) : string |
Return the Status-Line of this Response Message, consisting of the version, the status code and the reason phrase
Would be, for example, "HTTP/1.1 200 OK" or "HTTP/1.1 400 Bad Request" |
|
getStatusMessageByCode ( integer $statusCode ) : string |
Returns the human-readable message for the given status code. |
|
makeStandardsCompliant ( Request $request ) : void |
Analyzes this response, considering the given request and makes additions
or removes certain headers in order to make the response compliant to
RFC 2616 and related standards. |
|
renderHeaders ( ) : array |
Renders the HTTP headers - including the status header - of this response |
|
send ( ) : void |
Renders and sends the whole web response |
|
sendHeaders ( ) : void |
Sends the HTTP headers. |
|
setDate ( string | DateTime $date ) : Response |
Sets the Date header. |
|
setExpires ( string | DateTime $date ) : Response |
Sets the Expires header. |
|
setHeaders ( Headers $headers ) : void |
Replaces all possibly existing HTTP headers with the ones specified |
|
setLastModified ( string | DateTime $date ) : Response |
Sets the Last-Modified header. |
|
setMaximumAge ( integer $age ) : Response |
Sets the maximum age in seconds before this response becomes stale. |
|
setNow ( DateTime $now ) : void |
Sets the current point in time. |
|
setPrivate ( ) : Response |
Sets the respective directive in the Cache-Control header. |
|
setPublic ( ) : Response |
Sets the respective directive in the Cache-Control header. |
|
setSharedMaximumAge ( integer $maximumAge ) : Response |
Sets the maximum age in seconds before this response becomes stale in shared
caches, such as proxies. |
|
setStatus ( integer $code, string $message = null ) : Response |
Sets the HTTP status code and (optionally) a customized message. |
|