Response
class Response implements IResponse
HttpResponse class.
Properties
string | $cookieDomain | ||
string | $cookiePath | ||
bool | $cookieSecure | ||
bool | $cookieHttpOnly | ||
bool | $warnOnBuffer | ||
array read-only | $headers |
Methods
No description
Returns HTTP response code.
Sends a Content-type HTTP header.
Redirects to a new URL. Note: call exit() after it.
Sets the number of seconds before a page cached on a browser expires.
Checks if headers have been sent.
Returns value of an HTTP header.
Returns a list of headers to sent.
No description
Sends a cookie.
Deletes a cookie.
Details
at line 45
__construct()
No description
at line 61
IResponse
setCode($code, $reason = null)
Sets HTTP response code.
at line 91
int
getCode()
Returns HTTP response code.
at line 104
IResponse
setHeader($name, $value)
Sends a HTTP header and replaces a previous one.
at line 125
IResponse
addHeader($name, $value)
Adds HTTP header.
at line 140
IResponse
setContentType($type, $charset = null)
Sends a Content-type HTTP header.
at line 154
void
redirect($url, $code = self::S302_FOUND)
Redirects to a new URL. Note: call exit() after it.
at line 171
IResponse
setExpiration($time)
Sets the number of seconds before a page cached on a browser expires.
at line 191
bool
isSent()
Checks if headers have been sent.
at line 203
string|null
getHeader($header, $default = null)
Returns value of an HTTP header.
at line 220
array
getHeaders()
Returns a list of headers to sent.
at line 234
static
date($time = null)
deprecated
deprecated
No description
at line 241
__destruct()
No description
at line 269
IResponse
setCookie($name, $value, $time, $path = null, $domain = null, $secure = null, $httpOnly = null, $sameSite = null)
Sends a cookie.
at line 306
void
deleteCookie($name, $path = null, $domain = null, $secure = null)
Deletes a cookie.