class ServerHelper (View source)

The ServerHelper class.

Methods

static mixed
getValue(array $servers, string $name, mixed $default = null)

Access a value in an array, returning a default value if not found

static boolean
validateUploadedFiles(array $files)

Recursively validate the structure in an uploaded files array.

static array|false
getAllHeaders()

A proxy to getallheaders().

static array
apacheRequestHeaders()

A proxy to apacherequestheaders().

static array
parseFormData(string $input)

parseFormData

static boolean
setByPath(array $data, string $path, mixed $value, string $separator = '.')

setByPath

Details

at line line 31
static mixed getValue(array $servers, string $name, mixed $default = null)

Access a value in an array, returning a default value if not found

Will also do a case-insensitive search if a case sensitive search fails.

Parameters

array $servers Server values to search.
string $name The name we want to search.
mixed $default Default value if not found.

Return Value

mixed

at line line 50
static boolean validateUploadedFiles(array $files)

Recursively validate the structure in an uploaded files array.

Every file should be an UploadedFileInterface object.

Parameters

array $files Files array.

Return Value

boolean

at line line 77
static array|false getAllHeaders()

A proxy to getallheaders().

If this function not available, we will use native code to implement this function.

Return Value

array|false

at line line 106
static array apacheRequestHeaders()

A proxy to apacherequestheaders().

If this function not available, we will use native code to implement this function.

Return Value

array

at line line 141
static array parseFormData(string $input)

parseFormData

Parameters

string $input

Return Value

array

at line line 241
static boolean setByPath(array $data, string $path, mixed $value, string $separator = '.')

setByPath

Parameters

array $data &$data
string $path
mixed $value
string $separator

Return Value

boolean