class UploadFile (View source)

Methods

__construct(array $file)

UploadFile constructor.

string
getExtension()

Get the file extension

string
extension()

The is getExtension alias

string
getTypeMime()

Get the file extension

mixed
getFilesize()

Get the size of the file

bool
isUploaded()

Check if the file is uploader

string
getBasename()

Get the main name of the file

mixed
getFilename()

Get the filename

string
getContent()

Get the file content

string
getHashName()

Get the file hash name

bool
moveTo(string $to, string|null $filename = null)

Move the uploader file to a directory.

Details

__construct(array $file)

UploadFile constructor.

Parameters

array $file

string getExtension()

Get the file extension

Return Value

string

string extension()

The is getExtension alias

Return Value

string

string getTypeMime()

Get the file extension

Return Value

string

mixed getFilesize()

Get the size of the file

Return Value

mixed

bool isUploaded()

Check if the file is uploader

Return Value

bool

string getBasename()

Get the main name of the file

Return Value

string

mixed getFilename()

Get the filename

Return Value

mixed

string getContent()

Get the file content

Return Value

string

string getHashName()

Get the file hash name

Return Value

string

bool moveTo(string $to, string|null $filename = null)

Move the uploader file to a directory.

Parameters

string $to
string|null $filename

Return Value

bool

Exceptions