\LibDocument

Summary

Methods
Properties
Constants
getFileType()
formatBytes()
getExtension()
remove_extension()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getFileType()

getFileType(string  $extension) : string

group types into collections, its purpose is to assign the passed extension to the suitable group

Parameters

string $extension

file extension

Returns

string —

group name

formatBytes()

formatBytes(integer  $bytes, integer  $precision = 2) : string

create a human friendly measure of the size provided

Parameters

integer $bytes

file size

integer $precision

precision to be used

Returns

string —

size with measure

getExtension()

getExtension(string  $file) : string

return the file type based on the filename provided

Parameters

string $file

Returns

string

remove_extension()

remove_extension(string  $file) : \Lib\file

remove extension of file

Parameters

string $file

filename and extension

Returns

\Lib\file —

name missing extension