RestfulService_Response
class RestfulService_Response extends SS_HTTPResponse
Methods
Create a new HTTP response
The text to be given alongside the status code ("reason phrase").
Add a HTTP header to the response, replacing any header of the same name.
Remove an existing HTTP header by its name, e.g. "Content-Type".
Returns true if this response is "finished", that is, no more script execution should be done.
No description
get the cached response object. This allows you to access the cached eaders, not just the cached body.
No description
No description
Return an array of xpath matches
Return the first xpath match
Details
at line 583
__construct(string $body, int $statusCode = 200, $headers = null)
Create a new HTTP response
in SS_HTTPResponse at line 114
$this
setStatusCode(int $code, string $description = null)
in SS_HTTPResponse at line 130
$this
setStatusDescription(string $description)
The text to be given alongside the status code ("reason phrase").
Caution: Will be overwritten by {@link setStatusCode()}.
in SS_HTTPResponse at line 138
int
getStatusCode()
in SS_HTTPResponse at line 145
string
getStatusDescription()
in SS_HTTPResponse at line 154
bool
isError()
Returns true if this HTTP response is in error
in SS_HTTPResponse at line 162
$this
setBody(string $body)
in SS_HTTPResponse at line 170
null|string
getBody()
in SS_HTTPResponse at line 181
$this
addHeader(string $header, string $value)
Add a HTTP header to the response, replacing any header of the same name.
in SS_HTTPResponse at line 192
getHeader($header, $anyCase = false)
Return the HTTP header of the given name.
in SS_HTTPResponse at line 206
array
getHeaders()
in SS_HTTPResponse at line 217
$this
removeHeader(string $header)
Remove an existing HTTP header by its name, e.g. "Content-Type".
in SS_HTTPResponse at line 227
$this
redirect(string $dest, int $code = 302)
in SS_HTTPResponse at line 237
output()
Send this HTTPReponse to the browser
in SS_HTTPResponse at line 298
bool
isFinished()
Returns true if this response is "finished", that is, no more script execution should be done.
Specifically, returns true if a redirect has already been requested
at line 589
simpleXML()
at line 607
RestfulService_Response|false
getCachedResponse()
get the cached response object. This allows you to access the cached eaders, not just the cached body.
at line 614
string|false
getCachedBody()
at line 625
setCachedBody(string $content)
deprecated
deprecated
at line 638
setCachedResponse(string $response)
at line 645
xpath($xpath)
Return an array of xpath matches
at line 652
xpath_one($xpath)
Return the first xpath match