class UploadFile (View source)

Methods

__construct(array $file)

UploadFile constructor.

string
getExtension()

Get the file extension

string
extension()

The is getExtension alias

string|null
getTypeMime()

Get the file extension

int|null
getFilesize()

Get the size of the file

bool
isUploaded()

Check if the file is uploader

string|null
getBasename()

Get the main name of the file

string|null
getFilename()

Get the filename

string|null
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|null getTypeMime()

Get the file extension

Return Value

string|null

int|null getFilesize()

Get the size of the file

Return Value

int|null

bool isUploaded()

Check if the file is uploader

Return Value

bool

string|null getBasename()

Get the main name of the file

Return Value

string|null

string|null getFilename()

Get the filename

Return Value

string|null

string|null getContent()

Get the file content

Return Value

string|null

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