FacturaScripts

UploadedFile
in package

FinalYes

Table of Contents

Constants

BLOCKED_EXTENSIONS  = ['phar', 'php', 'php3', 'php4', 'php5', 'php7', 'php8', 'pht', 'phtml', 'phps']
IMAGE_EXTENSIONS  = ['gif', 'jpeg', 'jpg', 'png', 'webp']
IMAGE_MIME_TYPES  = ['image/gif', 'image/jpeg', 'image/png', 'image/webp']

Properties

$error  : int
$name  : string
$size  : int
$test  : bool
$tmp_name  : string
$type  : string

Methods

__construct()  : mixed
extension()  : string
getClientMimeType()  : string
getClientOriginalExtension()  : string
getClientOriginalName()  : string
getErrorMessage()  : string
getMaxFilesize()  : int
getMimeType()  : string
getPathname()  : string
getRealPath()  : string
getSize()  : int
isUploaded()  : bool
isValid()  : bool
isValidImage()  : bool
move()  : bool
moveTo()  : bool
hasBlockedExtension()  : bool
parseFilesize()  : int

Constants

BLOCKED_EXTENSIONS

private mixed BLOCKED_EXTENSIONS = ['phar', 'php', 'php3', 'php4', 'php5', 'php7', 'php8', 'pht', 'phtml', 'phps']

IMAGE_EXTENSIONS

private mixed IMAGE_EXTENSIONS = ['gif', 'jpeg', 'jpg', 'png', 'webp']

IMAGE_MIME_TYPES

private mixed IMAGE_MIME_TYPES = ['image/gif', 'image/jpeg', 'image/png', 'image/webp']

Properties

Methods

__construct()

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

extension()

public extension() : string
Return values
string

getClientMimeType()

public getClientMimeType() : string
Return values
string

getClientOriginalExtension()

public getClientOriginalExtension() : string

replaced by extension() method

Return values
string

getClientOriginalName()

public getClientOriginalName() : string
Return values
string

getErrorMessage()

public getErrorMessage() : string
Return values
string

getMaxFilesize()

public static getMaxFilesize() : int
Return values
int

getMimeType()

public getMimeType() : string
Return values
string

getPathname()

public getPathname() : string
Return values
string

getRealPath()

public getRealPath() : string
Return values
string

isUploaded()

public isUploaded() : bool
Return values
bool

isValidImage()

public isValidImage() : bool
Return values
bool

move()

public move(string $destiny, string $destinyName) : bool
Parameters
$destiny : string
$destinyName : string
Return values
bool

moveTo()

public moveTo(string $targetPath) : bool
Parameters
$targetPath : string
Return values
bool

hasBlockedExtension()

private hasBlockedExtension() : bool
Return values
bool

parseFilesize()

private static parseFilesize(string $size) : int
Parameters
$size : string
Return values
int

        
On this page

Search results