Menu

## Files
in package
implements Iterator

Files.php : 21

Class Files An array-based collection of files.

##### Tags

see
  https://www.kotchasan.com/

### Interfaces, Classes and Traits

Iterator

### Table of Contents

$datas : array<string|int, mixed>
$position : int
__construct() : mixed
  Initialize the class.
add() : mixed
  Add a file to the collection.
current() : UploadedFile
  Get the current UploadedFile.
get() : UploadedFile|null
  Get the specified file.
key() : string
  Get the key or index of the current UploadedFile in the list.
next() : mixed
  Move to the next UploadedFile in the list.
rewind() : mixed
  Rewind the Iterator to the first element.
valid() : bool
  Checks if the current position is valid.

### Properties

#### $datas

Files.php : 31
`private array<string|int, mixed> $datas = []`

#### $position

Files.php : 26
`private int $position = 0`

### Methods

#### __construct()

Files.php : 36

Initialize the class.

`public __construct() : mixed`

##### Return values

mixed —

#### add()

Files.php : 52

Add a file to the collection.

`public add(string $name, string $path, string $originalName[, string $mimeType = null ][, int $size = null ][, int $error = null ]) : mixed`

##### Parameters

$name : string

  Input name

$path : string

  Uploaded file path

$originalName : string

  Uploaded file name

$mimeType : string = null

  MIME Type

$size : int = null

  Uploaded file size

$error : int = null

  Upload error UPLOAD_ERR_XXX

##### Return values

mixed —

#### current()

Files.php : 85

Get the current UploadedFile.

`public current() : UploadedFile`

##### Return values

UploadedFile —

#### get()

Files.php : 118

Get the specified file.

`public get(string|int $key) : UploadedFile|null`

##### Parameters

$key : string|int

  The requested item

##### Return values

UploadedFile|null —

#### key()

Files.php : 96

Get the key or index of the current UploadedFile in the list.

`public key() : string`

##### Return values

string —

#### next()

Files.php : 105

Move to the next UploadedFile in the list.

`public next() : mixed`

##### Return values

mixed —

#### rewind()

Files.php : 63

Rewind the Iterator to the first element.

`public rewind() : mixed`

##### Return values

mixed —

#### valid()

Files.php : 74

Checks if the current position is valid.

`public valid() : bool`

##### Return values

bool —

## Search results