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

Breadcrumb

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

function Request::createFromGlobals

Creates a new request with values from PHP's super globals.

21 calls to Request::createFromGlobals()
authorize.php in core/authorize.php
Administrative script for running authorized file operations.
BootableCommandTrait::boot in core/lib/Drupal/Core/Command/BootableCommandTrait.php
Boots up a Drupal environment.
db-tools.php in core/scripts/db-tools.php
A command line application to import a database generation script.
dump-database-d8-mysql.php in core/scripts/dump-database-d8-mysql.php
A command line application to dump a database to a generation script.
ExtensionDiscovery::scan in core/lib/Drupal/Core/Extension/ExtensionDiscovery.php
Discovers available extensions of a given type.

... See full list

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public static function createFromGlobals() : static {
    $request = self::createRequestFromFactory($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER);
    if (str_starts_with($request->headers
        ->get('CONTENT_TYPE', ''), 'application/x-www-form-urlencoded') && \in_array(strtoupper($request->server
        ->get('REQUEST_METHOD', 'GET')), [
        'PUT',
        'DELETE',
        'PATCH',
    ], true)) {
        parse_str($request->getContent(), $data);
        $request->request = new InputBag($data);
    }
    return $request;
}
RSS feed
Powered by Drupal