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

Breadcrumb

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

function 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.

1 call to Request::setFactory()
DrupalKernel::setupTrustedHosts in core/lib/Drupal/Core/DrupalKernel.php
Sets up the lists of trusted HTTP Host headers.

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public static function setFactory(?callable $callable) : void {
    self::$requestFactory = null === $callable ? null : $callable(...);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal