Methods |
public
|
all(): array|null
Returns an array of all uploaded files that were found.
Each element in the array will be an instance of UploadedFile.…
Returns an array of all uploaded files that were found.
Each element in the array will be an instance of UploadedFile.
The key of each element will be the client filename.
|
#
|
public
|
getFile(string $name): UploadedFile|null
Attempts to get a single file from the collection of uploaded files.
Attempts to get a single file from the collection of uploaded files.
|
#
|
public
|
getFileMultiple(string $name): array|null
Verify if a file exist in the collection of uploaded files and is have been uploaded with multiple option.
Verify if a file exist in the collection of uploaded files and is have been uploaded with multiple option.
|
#
|
public
|
hasFile(string $fileID): bool
Checks whether an uploaded file with name $fileID exists in
this request.
Checks whether an uploaded file with name $fileID exists in
this request.
Parameters
$fileID |
The name of the uploaded file (from the input)
|
|
#
|
protected
|
populateFiles()
Taking information from the $_FILES array, it creates an instance
of UploadedFile for each one, saving the results to…
Taking information from the $_FILES array, it creates an instance
of UploadedFile for each one, saving the results to this->files.
Called by files(), file(), and hasFile()
|
#
|
protected
|
createFileObject(array $array): array|UploadedFile
Given a file array, will create UploadedFile instances. Will
loop over an array and create objects for each.
Given a file array, will create UploadedFile instances. Will
loop over an array and create objects for each.
|
#
|
protected
|
fixFilesArray(array $data): array
Reformats the odd $_FILES array into something much more like
we would expect, with each object having its own array.
Reformats the odd $_FILES array into something much more like
we would expect, with each object having its own array.
Thanks to Jack Sleight on the PHP Manual page for the basis
of this method.
|
#
|
protected
|
getValueDotNotationSyntax(array $index, array $value): mixed
Navigate through an array looking for a particular index
Navigate through an array looking for a particular index
Parameters
$index |
The index sequence we are navigating down
|
$value |
The portion of the array to process
|
|
#
|