ImageUpload
in package
uses
TraitDataWrite
Table of Contents
Properties
- $dataWrite : DataWrite
- $delImg : DelImg
- $sourcePath : string
- $env : array<string|int, mixed>
- $image : Image
Methods
- __construct() : mixed
- generateSourcePaths() : string
- getDataWriteInstance() : DataWrite
- getExtension() : string
- Get's the extension of jpg, gif, png or webp
- getMaxPosImg() : int
- getPath() : string
- getSizeAndHandleExt() : array<string|int, mixed>
- Get size and handle extensions for given file
- renameToRandom() : string
- Get's the extension of jpg, gif or png
- fallbackExtension() : string
Properties
$dataWrite
public
DataWrite
$dataWrite
$delImg
public
DelImg
$delImg
$sourcePath
public
string
$sourcePath
$env
private
array<string|int, mixed>
$env
$image
private
Image
$image
Methods
__construct()
public
__construct() : mixed
generateSourcePaths()
public
generateSourcePaths(mixed $strSourceFileName) : string
Parameters
- $strSourceFileName : mixed
Return values
stringgetDataWriteInstance()
public
getDataWriteInstance() : DataWrite
Return values
DataWritegetExtension()
Get's the extension of jpg, gif, png or webp
public
getExtension(string $file) : string
Parameters
- $file : string
-
- the file with the path
Return values
string —- extension or nothing
getMaxPosImg()
public
getMaxPosImg(int $nUserID[, int $partyID = 0 ]) : int
Parameters
- $nUserID : int
- $partyID : int = 0
Return values
intgetPath()
public
getPath(string $sourceIndex) : string
Parameters
- $sourceIndex : string
Return values
stringgetSizeAndHandleExt()
Get size and handle extensions for given file
public
getSizeAndHandleExt(string $sourceFile, string $fileName) : array<string|int, mixed>
Parameters
- $sourceFile : string
- $fileName : string
Return values
array<string|int, mixed>renameToRandom()
Get's the extension of jpg, gif or png
public
renameToRandom(string $file) : string
Parameters
- $file : string
-
- the file with the path
Tags
Return values
string —- extension or nothing
fallbackExtension()
private
fallbackExtension(string $nExtIndex) : string
Parameters
- $nExtIndex : string