SS_HTTPResponse
class SS_HTTPResponse
Represents a response returned by a controller.
Methods
Create a new HTTP response
No description
The text to be given alongside the status code ("reason phrase").
No description
No description
Returns true if this HTTP response is in error
No description
No description
Add a HTTP header to the response, replacing any header of the same name.
Return the HTTP header of the given name.
No description
Remove an existing HTTP header by its name, e.g. "Content-Type".
No description
Send this HTTPReponse to the browser
Returns true if this response is "finished", that is, no more script execution should be done.
Details
at line 101
__construct(string $body = null, int $statusCode = null, string $statusDescription = null)
Create a new HTTP response
at line 114
$this
setStatusCode(int $code, string $description = null)
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()}.
at line 138
int
getStatusCode()
at line 145
string
getStatusDescription()
at line 154
bool
isError()
Returns true if this HTTP response is in error
at line 162
$this
setBody(string $body)
at line 170
null|string
getBody()
at line 181
$this
addHeader(string $header, string $value)
Add a HTTP header to the response, replacing any header of the same name.
at line 192
getHeader($header, $anyCase = false)
Return the HTTP header of the given name.
at line 206
array
getHeaders()
at line 217
$this
removeHeader(string $header)
Remove an existing HTTP header by its name, e.g. "Content-Type".
at line 227
$this
redirect(string $dest, int $code = 302)
at line 237
output()
Send this HTTPReponse to the browser
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