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<, mixed>
__construct()  : mixed
The constructor
current()  : array<, mixed>
Returns the value of the current element of the "array"



private array<, mixed> $far

The base entry in the $_FILES array.



The constructor

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

The name of the entry in the $_FILES array

throws \Framework\Exception\InternalError

Return values


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

public current() : array<, 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<, mixed>

Search results