class Files extends Parameters

Files.

Properties

protected array $parameters Parameters. from Parameters

Methods

__construct(array $parameters = [])

Constructor.

int
count()

Returns the numner of items in the collection.

getIterator()

Retruns an array iterator object.

add(string $name, mixed $value)

Adds a parameter.

bool
has(string $name)

Returns TRUE if the parameter exists and FALSE if not.

mixed
get(string $name, mixed $default = null)

Gets a parameter value.

remove(string $name)

Removes a parameter.

array
all()

Returns all the parameters.

array
whitelisted(array $keys, array $defaults = [])

Returns request data where keys not in the whitelist have been removed.

array
blacklisted(array $keys, array $defaults = [])

Returns request data where keys in the blacklist have been removed.

createUploadedFile(array $file)

Creates a UploadedFile object.

array
normalizeMultiUpload(array $files)

Normalizes a multi file upload array to a more manageable format.

array
convertToUploadedFileObjects(array $files)

Converts the $_FILES array to an array of UploadedFile objects.

Details

at line 22
__construct(array $parameters = [])

Constructor.

Parameters

array $parameters Parameters

in Parameters at line 47
int count()

Returns the numner of items in the collection.

Return Value

int

in Parameters at line 57
ArrayIterator getIterator()

Retruns an array iterator object.

Return Value

ArrayIterator

at line 94
add(string $name, mixed $value)

Adds a parameter.

Parameters

string $name Parameter name
mixed $value Parameter value

in Parameters at line 79
bool has(string $name)

Returns TRUE if the parameter exists and FALSE if not.

Parameters

string $name Parameter name

Return Value

bool

in Parameters at line 91
mixed get(string $name, mixed $default = null)

Gets a parameter value.

Parameters

string $name Parameter name
mixed $default Default value

Return Value

mixed

in Parameters at line 101
remove(string $name)

Removes a parameter.

Parameters

string $name Parameter name

in Parameters at line 111
array all()

Returns all the parameters.

Return Value

array

in Parameters at line 123
array whitelisted(array $keys, array $defaults = [])

Returns request data where keys not in the whitelist have been removed.

Parameters

array $keys Keys to whitelist
array $defaults Default values

Return Value

array

in Parameters at line 135
array blacklisted(array $keys, array $defaults = [])

Returns request data where keys in the blacklist have been removed.

Parameters

array $keys Keys to whitelist
array $defaults Default values

Return Value

array

at line 33
protected UploadedFile createUploadedFile(array $file)

Creates a UploadedFile object.

Parameters

array $file File info

Return Value

UploadedFile

at line 44
protected array normalizeMultiUpload(array $files)

Normalizes a multi file upload array to a more manageable format.

Parameters

array $files File upload array

Return Value

array

at line 69
protected array convertToUploadedFileObjects(array $files)

Converts the $_FILES array to an array of UploadedFile objects.

Parameters

array $files File upload array

Return Value

array