Class FileCollection

Summary

Fully Qualified Name: CodeIgniter\HTTP\Files\FileCollection

Description

Class FileCollection

Provides easy access to uploaded files for a request.

Methods

Name Description Defined By
all() Returns an array of all uploaded files that were found. FileCollection
getFile() Attempts to get a single file from the collection of uploaded files. FileCollection
getFileMultiple() Verify if a file exist in the collection of uploaded files and is have been uploaded with multiple option. FileCollection
hasFile() Checks whether an uploaded file with name $fileID exists in this request. FileCollection

Method Details

all()

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.

Returns: array|null

getFile()

Attempts to get a single file from the collection of uploaded files.

Parameter Name Type Description
$name string

Returns: \UploadedFile|null

getFileMultiple()

Verify if a file exist in the collection of uploaded files and is have been uploaded with multiple option.

Parameter Name Type Description
$name string

Returns: array|null

hasFile()

Checks whether an uploaded file with name $fileID exists in this request.

Parameter Name Type Description
$fileID string The

Returns: bool

Top