Documentation

FAIterator extends ArrayIterator
in package

A class to iterate over array values in $_FILES and make them look like singletons

Table of Contents

$far  : array<string|int, mixed>
__construct()  : mixed
The constructor
current()  : array<string|int, mixed>
Returns the value of the current element of the "array"

Properties

Methods

__construct()

The constructor

public __construct(string $name) : mixed
Parameters
$name : string

The name of the entry in the $_FILES array

throws \Framework\Exception\InternalError

Return values
mixed

current()

Returns the value of the current element of the "array"

public current() : array<string|int, mixed>

This returns an array that looks like what you would get if the file upload was a singleton and not an array. This can simplify coding in certain circumstances even though it involves restructuring the data and hence is slightly inefficient. Basically the $_FILES array should be made from objects with fields not arrays of keyed values!!!

Return values
array<string|int, mixed>

Search results