Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

PHP DOM Builder API

PHP DOM Builder has been unveiled in second revision

In 2014 year PHP DOM Builder library was unveiled at the first time within the framework of Baigudin Software project. Two years have been left after that moment and today we are glad to offer the second generation that is PHP DOM Builder Revision 2.

Class «DomBuilder\Element\Input\File»

input type=file – file upload control.

The input element with a type attribute whose value is "file" represents a list of file items, each consisting of a file name, a file type, and a file body (the contents of the file).

All implemented interfaces:

Object Builder Property Attribute Traverse Fetch Search Tester Field

public \StdClass file();

Returns checked uploaded file information.

Method returns a file information which gets after checking.

Returns:
\StdClass — file information.

public int|File fileMaxSize(int $size=NULL);

Returns or sets available maximum rage size for file size.

Parameters:
int $size — maximum size in byte.

Returns:
int|File — a current value or this element.

public int|File fileMinSize(int $size=NULL);

Returns or sets available minimum rage size for file size.

Parameters:
int $size — minimum size in byte.

Returns:
int|File — a current value or this element.

public File fileSize(int $min, int $max);

Sets an available rage for file size.

Parameters:
int $min — minimum size in byte.
int $max — maximum size in byte.

Returns:
File — this element.

public \StdClass value(mixed $value=NULL, string $lang=NULL);

Returns unchecked uploaded file information.

The method returns uploaded file information in StdClass object which contains a name, path, type, and size fields.

Parameters:
mixed $value — always should be NULL.
string $lang — always should be NULL.

Returns:
\StdClass — file information.

Back to class list