66 if ($status_code < 100 || $status_code > 599) {
67 throw new RangeException(__METHOD__ .
' expects a valid HTTP status code');
93 if (!isset($this->forward_url)) {
98 if ($forward_url ===
REFERRER || !$this->secure_forward_url) {
124 return $this->status_code >= 100 && $this->status_code <= 199;
131 return $this->status_code >= 200 && $this->status_code <= 299;
138 return $this->status_code === 200;
145 return in_array($this->status_code, [201, 301, 302, 303, 307, 308]);
152 return $this->status_code >= 400 && $this->status_code <= 499;
159 return $this->status_code >= 500 && $this->status_code <= 599;
166 return $this->status_code === 304;
isNotModified()
{Check if response has been modified.bool}
Exception thrown to indicate range errors during program execution.
HTTP response builder interface.
Exception thrown if an argument is not of the expected type.
getHeaders()
{Returns additional response headers.array}
elgg_normalize_site_url(string $unsafe_url)
From untrusted input, get a site URL safe for forwarding.
isRedirection()
{Check if response is redirection.bool}
setStatusCode(int $status_code)
{Sets response HTTP status code.Status code self }
isInformational()
{Check if response is informational.bool}
isSuccessful()
{Check if response is successful.bool}
setForwardURL(string $forward_url=REFERRER)
{Sets redirect URL.Forward URL self }
getException()
{Get the exception for this reponse.|null}
getContent()
{Returns response body.mixed}
getForwardURL()
{Returns redirect URL.string|null string the forward url, null when no url was set or the constant RE...
const REFERRER
Used in calls to forward() to specify the browser should be redirected to the referring page...
getStatusCode()
{Returns status code.int}
setHeaders(array $headers=[])
{Sets additional response headers.Headers self}
isOk()
{Check if response is OK.bool}
setContent($content= '')
{Sets response body.Content of the response as a scalar value or an array self }
isServerError()
{Check if response is server error.bool}
isClientError()
{Check if response is client error.bool}
setException(\Exception $e)
{Set an exception for this response.the exception for this responseself}
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special exception