A class to iterate over array values in $_FILES and make them look like singletons
- $far : array<string|int, mixed>
- __construct() : mixed
- The constructor
- current() : array<string|int, mixed>
- Returns the value of the current element of the "array"
private array<string|int, mixed> $far
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<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!!!