You are here

public function EnforcedResponse::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Form/EnforcedResponse.php \Drupal\Core\Form\EnforcedResponse::__construct()

Constructs an enforced response.

Use EnforcedResponse::createFromException() instead.

Parameters

\Symfony\Component\HttpFoundation\Response $response: The response to wrap.

Overrides Response::__construct

File

core/lib/Drupal/Core/Form/EnforcedResponse.php, line 67
Contains \Drupal\Core\Form\EnforcedResponse.

Class

EnforcedResponse
A wrapper containing a response which is to be enforced upon delivery.

Namespace

Drupal\Core\Form

Code

public function __construct(Response $response) {
  parent::__construct('', 500);
  $this->response = $response;
}