A class to iterate over array values in $_FILES and make them look like singletons
- $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.
public __construct(string $name) : mixed
- $name : string
The name of the entry in the $_FILES array
Return valuesmixed —
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!!!