Documentation

rex_managed_media
in package

Table of Contents

Constants

PROP_AVIF_QUALITY  = 'avif_quality'
PROP_AVIF_SPEED  = 'avif_speed'
PROP_INTERLACE  = 'interlace'
PROP_JPG_QUALITY  = 'jpg_quality'
PROP_PNG_COMPRESSION  = 'png_compression'
PROP_WEBP_QUALITY  = 'webp_quality'

Methods

__construct()  : mixed
asImage()  : void
exists()  : bool
formatSupportsTransparency()  : bool
getFormat()  : string
getHeader()  : array<string, string>
getHeight()  : int|null
getImage()  : GdImage
getImageHeight()  : int|null
getImageProperty()  : mixed|null
getImageWidth()  : int|null
getMediaFilename()  : string
getMediaPath()  : string|null
Returns the original path of the media.
getSource()  : string
getSourcePath()  : string
Returns the current source path.
getWidth()  : int|null
refreshImageDimensions()  : void
save()  : void
sendMedia()  : void
setFormat()  : void
setHeader()  : void
setImage()  : void
setImageProperty()  : void
setMediaFilename()  : void
setMediaPath()  : void
setSourcePath()  : void
getImageSource()  : string

Constants

PROP_AVIF_QUALITY

public mixed PROP_AVIF_QUALITY = 'avif_quality'

PROP_JPG_QUALITY

public mixed PROP_JPG_QUALITY = 'jpg_quality'

PROP_PNG_COMPRESSION

public mixed PROP_PNG_COMPRESSION = 'png_compression'

PROP_WEBP_QUALITY

public mixed PROP_WEBP_QUALITY = 'webp_quality'

Methods

__construct()

public __construct(string $mediaPath) : mixed
Parameters
$mediaPath : string

formatSupportsTransparency()

public formatSupportsTransparency() : bool
Return values
bool

getFormat()

public getFormat() : string
Return values
string

getHeader()

public getHeader() : array<string, string>
Return values
array<string, string>

getHeight()

public getHeight() : int|null
Return values
int|null

getImage()

public getImage() : GdImage
Return values
GdImage

getImageHeight()

public getImageHeight() : int|null
Tags
deprecated

since 2.3.0, use getHeight() instead

Return values
int|null

getImageProperty()

public getImageProperty(string $name[, mixed $default = null ]) : mixed|null
Parameters
$name : string
$default : mixed = null
Return values
mixed|null

getImageWidth()

public getImageWidth() : int|null
Tags
deprecated

since 2.3.0, use getWidth() instead

Return values
int|null

getMediaFilename()

public getMediaFilename() : string
Return values
string

getMediaPath()

Returns the original path of the media.

public getMediaPath() : string|null

To get the current source path (can be changed by effects) use getSourcePath instead.

Return values
string|null

getSource()

public getSource() : string
Return values
string

getSourcePath()

Returns the current source path.

public getSourcePath() : string

To get the original media path use getMediaPath() instead.

Return values
string

getWidth()

public getWidth() : int|null
Return values
int|null

refreshImageDimensions()

public refreshImageDimensions() : void

save()

public save(string $sourceCachePath, string $headerCachePath) : void
Parameters
$sourceCachePath : string
$headerCachePath : string

sendMedia()

public sendMedia(string $sourceCachePath, string $headerCachePath[, bool $save = false ]) : void
Parameters
$sourceCachePath : string
$headerCachePath : string
$save : bool = false

setFormat()

public setFormat(string $format) : void
Parameters
$format : string

setHeader()

public setHeader(string $name, string $value) : void
Parameters
$name : string
$value : string

setImage()

public setImage(GdImage $src) : void
Parameters
$src : GdImage

setImageProperty()

public setImageProperty(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

setMediaFilename()

public setMediaFilename(string $filename) : void
Parameters
$filename : string

setMediaPath()

public setMediaPath(string|null $mediaPath) : void
Parameters
$mediaPath : string|null

setSourcePath()

public setSourcePath(string $path) : void
Parameters
$path : string

getImageSource()

protected getImageSource() : string
Return values
string

        
On this page

Search results