Method |
Description |
|
addCookie ( AppserverIo\Psr\HttpMessage\CookieInterface $cookie ) : void |
Adds a cookie. |
|
addHeader ( string $name, string $value, boolean $append = false ) : void |
Adds a header information got from connection. We've to take care that headers
like Set-Cookie header can exist multiple times. To support this create an
array that keeps the multiple header values. |
|
appendBodyStream ( string $content ) : void |
Appends the content. |
|
copyBodyStream ( resource $sourceStream, integer $maxlength = null, integer $offset ) : integer |
Copies a source stream to body stream. |
|
getBodyContent ( ) : string |
Return content |
|
getBodyStream ( ) : resource |
Returns the body stream as a resource. |
|
getCookie ( string $cookieName ) : mixed |
Returns the cookie with the a cookie |
|
getCookies ( ) : array |
Returns the cookies. |
|
getException ( ) : Exception | null |
Returns the exception bound to the response. |
|
getHeader ( string $name ) : mixed |
Returns header by given name. |
|
getHeaders ( ) : array |
Returns all headers as array |
|
getHeadersAsString ( ) : string |
Returns the headers as string |
|
getState ( ) : integer |
Returns the current state |
|
getStatusCode ( ) : integer |
Returns the response status code |
|
getStatusReasonPhrase ( ) : string |
Returns the status phrase based on the status code |
|
getVersion ( ) : string |
Returns the http version of the response |
|
hasCookie ( string $cookieName ) : boolean |
Returns TRUE if the response already has a cookie with the passed
name, else FALSE. |
|
hasException ( ) : boolean |
Queries whether the response contains an exception or not. |
|
hasHeader ( string $name ) : boolean |
Check's if header exists by given name |
|
hasState ( integer $state ) : boolean |
Compares current state with given state |
|
init ( ) : void |
Initialises the response object to default properties. |
|
redirect ( string $url, integer $code = 301 ) : void |
Redirects to the passed URL by adding a 'Location' header and
setting the appropriate status code, by default 301. |
|
removeHeader ( string $name ) : void |
Removes the header with the passed name. |
|
resetBodyStream ( ) : void |
Reset the body stream |
|
setBodyStream ( resource $bodyStream ) : void |
Resetss the stream resource pointing to body content. |
|
setException ( Exception $exception ) : void |
Binds the exception to the response. |
|
setHeaders ( array $headers ) : void |
Resets all headers by given array |
|
setState ( integer $state ) : void |
Sets state of response |
|
setStatusCode ( integer $code ) : void |
Sets the http response status code |
|
setStatusReasonPhrase ( string $statusReasonPhrase ) : void |
Sets the status reason phrase |
|