File
extends Base
in package
A class that provides helpers for accessing PUT OR PATCH form data
Table of Contents
- $super : array<, mixed>
- $which : int
- __construct() : mixed
- Constructor
- exists() : bool
- Is the key in the array?
- fileArray() : ArrayIterator
- Make arrays of files work more like singletons
- fileData() : array<, mixed>
- Make arrays of files work more like singletons
- mustExist() : bool
- Is the key in the array?
- getSuper() : array<, mixed>
- Return the relevant Superglobal
Properties
$super
protected
array<, mixed>
$super
The array that contains the relevant values. It is protected rather than private as some items do not have Superglobals and set this value to an array;
$which
protected
int
$which
Indicates which Superglobal we are using
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —exists()
Is the key in the array?
public
exists(mixed $name) : bool
Parameters
- $name : mixed
-
The keys
Tags
Return values
bool —fileArray()
Make arrays of files work more like singletons
public
fileArray(string $name[, array<, mixed> $dflt = [] ]) : ArrayIterator
Parameters
- $name : string
- $dflt : array<, mixed> = []
Return values
ArrayIterator —fileData()
Make arrays of files work more like singletons
public
fileData(mixed $name[, mixed $key = '' ]) : array<, mixed>
Parameters
- $name : mixed
- $key : mixed = ''
Tags
Return values
array<, mixed> —mustExist()
Is the key in the array?
public
mustExist(mixed $name) : bool
Parameters
- $name : mixed
-
The keys
Tags
Return values
bool —getSuper()
Return the relevant Superglobal
protected
getSuper([int $which = NULL ]) : array<, mixed>
@TODO Change this to use match() when PHP 8 is released
Parameters
- $which : int = NULL
-
@return array