You are here

public static function Request::setFactory in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Request.php \Symfony\Component\HttpFoundation\Request::setFactory()

Sets a callable able to create a Request instance.

This is mainly useful when you need to override the Request class to keep BC with an existing system. It should not be used for any other purpose.

Parameters

callable|null $callable A PHP callable:

3 calls to Request::setFactory()
DrupalKernel::setupTrustedHosts in core/lib/Drupal/Core/DrupalKernel.php
Sets up the lists of trusted HTTP Host headers.
DrupalKernelTest::testTrustedHosts in core/tests/Drupal/Tests/Core/DrupalKernel/DrupalKernelTest.php
Tests hostname validation with settings.
RequestTest::testFactory in vendor/symfony/http-foundation/Tests/RequestTest.php

File

vendor/symfony/http-foundation/Request.php, line 409

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public static function setFactory($callable) {
  self::$requestFactory = $callable;
}