Documentation

RequestedFile
in package

Requested File Class

Represents a file sent in a request. Read-only.

Table of Contents

Properties

$binary  : string
$error  : string
$ext  : string
$isValid  : bool
$mimetype  : string
$name  : string
$size  : int
$temporary  : string

Methods

__construct()  : mixed
Constructor.
__destruct()  : mixed
Destructor.
__get()  : mixed
Magic getter method.
MoveTo()  : void
Moves the temporary file to the specified directory.

Properties

$isValid

public bool $isValid

Indicates whether the file is valid.

$mimetype

public string $mimetype

The MIME type of the file.

$temporary

public string $temporary

The path to the temporary file.

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed>|object $arrFILE) : mixed
Parameters
$arrFILE : array<string|int, mixed>|object

The $_FILE array or object.

__get()

Magic getter method.

public __get(string $prop) : mixed
Parameters
$prop : string

The property name.

Return values
mixed

The value of the property.

MoveTo()

Moves the temporary file to the specified directory.

public MoveTo(string $path[, int $mode = 0777 ]) : void
Parameters
$path : string

The destination path.

$mode : int = 0777

The permissions to set for the file (default: 0777).


        
On this page

Search results