Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Response.php

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\HttpFoundation

Code

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;
}
RSS feed
Powered by Drupal