‪TYPO3CMS  9.5
TYPO3\CMS\Core\Http\ServerRequestFactory Class Reference

Static Public Member Functions

static ServerRequest fromGlobals ()
 

Static Protected Member Functions

static array prepareHeaders (array $server)
 
static array normalizeUploadedFiles (array $files)
 
static UploadedFileInterface[] UploadedFileInterface null createUploadedFile (array $value)
 

Detailed Description

Class ServerRequestFactory to create ServerRequest objects

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

Note that this is not public API yet.

Definition at line 27 of file ServerRequestFactory.php.

Member Function Documentation

◆ createUploadedFile()

static UploadedFileInterface [] UploadedFileInterface null 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 142 of file ServerRequestFactory.php.

Referenced by TYPO3\CMS\Core\Http\ServerRequestFactory\normalizeUploadedFiles().

◆ fromGlobals()

◆ normalizeUploadedFiles()

static array 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 111 of file ServerRequestFactory.php.

References TYPO3\CMS\Core\Http\ServerRequestFactory\createUploadedFile().

◆ prepareHeaders()

static array 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 77 of file ServerRequestFactory.php.