Response
class Response implements ResponseInterface
The global HTTP response class
Properties
static array | $content_types |
Methods
Constructor : defines the current URL and gets the routes
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Writes a header string if headers had not been sent
Send the response to the device
Force client to download a file
Flush (display) a file content
No description
Details
at line 84
__construct(
string|null $content = null,
string|null $charset = null)
Constructor : defines the current URL and gets the routes
at line 101
string
__toString()
at line 114
$this
setProtocol($value)
at line 123
string
getProtocol()
at line 132
$this
setStatus($flag)
at line 141
mixed
getStatus()
at line 150
$this
setCharset($string)
at line 159
string
getCharset()
at line 169
$this
addContent(
string $name,
mixed $content)
at line 183
$this
setContents(
array $contents)
at line 194
null
getContent($name,
null $default = null)
at line 202
array
getContents()
at line 210
string
getContentsAsString()
at line 223
Response
setContentType(
string $type)
at line 232
object
getContentType()
at line 240
Response
guessContentType()
at line 254
Response
setHeaders(
array $params)
at line 265
Response
addHeader(
string $name,
string $value = null)
at line 274
array
getHeaders()
at line 283
string|null
getHeader(
string $name)
at line 294
bool
hasHeader(
string $name)
at line 306
void
renderHeaders()
at line 319
static
header(
string $str)
Writes a header string if headers had not been sent
at line 334
mixed
send(
null $content = null,
null $type = null,
bool $return_string = false)
Send the response to the device
at line 362
download(
null $file = null,
null $type = null,
null $file_name = null)
Force client to download a file
at line 389
flush(
null $file_content = null,
null $type = null)
Flush (display) a file content