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

Breadcrumb

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

function ServerRequestCreatorInterface::fromArrays

Create a new server request from a set of arrays.

Parameters

array $server typically $_SERVER or similar structure:

array $headers typically the output of getallheaders() or similar structure:

array $cookie typically $_COOKIE or similar structure:

array $get typically $_GET or similar structure:

array|null $post typically $_POST or similar structure, represents parsed request body:

array $files typically $_FILES or similar structure:

StreamInterface|resource|string|null $body Typically stdIn:

Throws

\InvalidArgumentException if no valid method or URI can be determined

1 method overrides ServerRequestCreatorInterface::fromArrays()
ServerRequestCreator::fromArrays in vendor/nyholm/psr7-server/src/ServerRequestCreator.php
Create a new server request from a set of arrays.

File

vendor/nyholm/psr7-server/src/ServerRequestCreatorInterface.php, line 40

Class

ServerRequestCreatorInterface
@author Tobias Nyholm <tobias.nyholm@gmail.com> @author Martijn van der Ven <martijn@vanderven.se>

Namespace

Nyholm\Psr7Server

Code

public function fromArrays(array $server, array $headers = [], array $cookie = [], array $get = [], ?array $post = null, array $files = [], $body = null) : ServerRequestInterface;

API Navigation

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