MetaFox

ResizeImage
in package
implements ResizeImageInterface

Table of Contents

Interfaces

ResizeImageInterface

Constants

SIZE  = ['75', '100', '150', '240', '500', '1024']
SQUARE_SIZE  = ['50x50', '120x120', '200x200']

Properties

$extra  : array<string|int, mixed>
$fileName  : string|null
$image  : mixed
$imageHeight  : int
$imageWidth  : int
$itemType  : string|null
$options  : array<string|int, mixed>
$originalName  : string|null
$path  : mixed|string
path to.
$serverId  : mixed|string
$sizes  : array<string|int, int>
$squareSizes  : array<string|int, int>
$user  : Entity|null

Methods

createFile()  : StorageFile
createThumb()  : array<string|int, mixed>|null
getFileName()  : string
getPrefixPath()  : string
getSizes()  : array<string|int, string>
getSquareSizes()  : array<string|int, int>
setExtra()  : ResizeImage
setFileName()  : ResizeImage
setImage()  : static
setItemType()  : $this
setOptions()  : static
setOriginalName()  : $this
setPath()  : static
setServerId()  : ResizeImage
setSizes()  : static
setSquareSizes()  : self
setUser()  : $this
getResizeSize()  : array<string|int, mixed>|null

Constants

SIZE

public mixed SIZE = ['75', '100', '150', '240', '500', '1024']

SQUARE_SIZE

public mixed SQUARE_SIZE = ['50x50', '120x120', '200x200']

Properties

$options

private array<string|int, mixed> $options = ['visibility' => 'public']

$originalName

private string|null $originalName = null

$sizes

private array<string|int, int> $sizes = self::SIZE

$squareSizes

private array<string|int, int> $squareSizes = self::SQUARE_SIZE

Methods

createThumb()

public createThumb(string $variant, mixed $originalId, bool $forceCreate, Closure $callback) : array<string|int, mixed>|null
Parameters
$variant : string
$originalId : mixed
$forceCreate : bool
$callback : Closure
Return values
array<string|int, mixed>|null

getFileName()

public getFileName() : string
Return values
string

getPrefixPath()

public getPrefixPath() : string
Return values
string

getSizes()

public getSizes() : array<string|int, string>
Return values
array<string|int, string>

getSquareSizes()

public getSquareSizes() : array<string|int, int>
Return values
array<string|int, int>

setImage()

public setImage(mixed $imageFile) : static
Parameters
$imageFile : mixed
Return values
static

setItemType()

public setItemType(string|null $itemType) : $this
Parameters
$itemType : string|null
Return values
$this

setOptions()

public setOptions(array<string|int, mixed>|array<string|int, string> $options) : static
Parameters
$options : array<string|int, mixed>|array<string|int, string>
Return values
static

setOriginalName()

public setOriginalName(string $clientOriginalName) : $this
Parameters
$clientOriginalName : string
Return values
$this

setPath()

public setPath(string $path) : static
Parameters
$path : string
Return values
static

setSizes()

public setSizes(array<string|int, int> $sizes) : static
Parameters
$sizes : array<string|int, int>
Return values
static

setSquareSizes()

public setSquareSizes(array<string|int, int> $squareSizes) : self
Parameters
$squareSizes : array<string|int, int>
Return values
self

getResizeSize()

private getResizeSize(int $orgWidth, int $orgHeight, int $newWidth, int $newHeight) : array<string|int, mixed>|null
Parameters
$orgWidth : int
$orgHeight : int
$newWidth : int
$newHeight : int
Return values
array<string|int, mixed>|null

        
On this page

Search results