function Response::send
Sends HTTP headers and content.
Parameters
bool $flush Whether output buffers should be flushed:
Return value
$this
File
-
vendor/
symfony/ http-foundation/ Response.php, line 392
Class
- Response
- Response represents an HTTP response.
Namespace
Symfony\Component\HttpFoundationCode
public function send(bool $flush = true) : static {
$this->sendHeaders();
$this->sendContent();
if (!$flush) {
return $this;
}
if (\function_exists('fastcgi_finish_request')) {
fastcgi_finish_request();
}
elseif (\function_exists('litespeed_finish_request')) {
litespeed_finish_request();
}
elseif (!\in_array(\PHP_SAPI, [
'cli',
'phpdbg',
'embed',
], true)) {
static::closeOutputBuffers(0, true);
flush();
}
return $this;
}