Uploader
Responsible for handling uploads and formatting data just before the upload.
Tags
Table of Contents
- $file_data : array<string|int, mixed>
- List of files submitted.
- __construct() : mixed
- Initialize the class.
- prepare_uploaded_files() : array<string|int, mixed>
- Prepares a formatted array so that we can then upload the files later.
- upload_file() : object
- Execute the upload of files.
Properties
$file_data
List of files submitted.
private
array<string|int, mixed>
$file_data
Tags
Methods
__construct()
Initialize the class.
public
__construct(array<string|int, mixed> $file_data) : mixed
Parameters
- $file_data : array<string|int, mixed>
Tags
Return values
mixed —prepare_uploaded_files()
Prepares a formatted array so that we can then upload the files later.
public
prepare_uploaded_files() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —upload_file()
Execute the upload of files.
public
upload_file(array<string|int, mixed> $file[, array<string|int, mixed> $args = [] ]) : object
Parameters
- $file : array<string|int, mixed>
-
Array of $_FILE data to upload
- $args : array<string|int, mixed> = []
-
Optional file arguments.
Tags
Return values
object —details of the uploaded file.