TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ServerRequestFactory Class Reference

Static Public Member Functions

static fromGlobals ()
 

Static Protected Member Functions

static prepareHeaders (array $server)
 
static normalizeUploadedFiles (array $files)
 
static createUploadedFile (array $value)
 

Detailed Description

Class ServerRequestFactory to create ServerRequest objects

Highly inspired by https://github.com/phly/http/

Definition at line 27 of file ServerRequestFactory.php.

Member Function Documentation

static createUploadedFile ( array  $value)
staticprotected

Create and return an UploadedFile instance from a $_FILES specification.

If the specification represents an array of values, this method will recursively resolve uploaded files.

Parameters
array$value$_FILES structure
Returns
UploadedFileInterface[]|UploadedFileInterface|NULL

Definition at line 142 of file ServerRequestFactory.php.

static fromGlobals ( )
static
static normalizeUploadedFiles ( array  $files)
staticprotected

Normalize uploaded files

Transforms each value into an UploadedFileInterface instance, and ensures that nested arrays are normalized.

Parameters
array$files
Returns
array
Exceptions
InvalidArgumentException for unrecognized values

Definition at line 111 of file ServerRequestFactory.php.

static prepareHeaders ( array  $server)
staticprotected

Fetch headers from $_SERVER variables which are only the ones starting with HTTP_* and CONTENT_*

Parameters
array$server
Returns
array

Definition at line 77 of file ServerRequestFactory.php.