TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Http\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

◆ createUploadedFile()

static TYPO3\CMS\Core\Http\ServerRequestFactory::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 139 of file ServerRequestFactory.php.

◆ fromGlobals()

◆ normalizeUploadedFiles()

static TYPO3\CMS\Core\Http\ServerRequestFactory::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

Definition at line 108 of file ServerRequestFactory.php.

◆ prepareHeaders()

static TYPO3\CMS\Core\Http\ServerRequestFactory::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 74 of file ServerRequestFactory.php.