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_AVIF_SPEED
public
mixed
PROP_AVIF_SPEED
= 'avif_speed'
PROP_INTERLACE
public
mixed
PROP_INTERLACE
= 'interlace'
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
asImage()
public
asImage() : void
exists()
public
exists() : bool
Return values
boolformatSupportsTransparency()
public
formatSupportsTransparency() : bool
Return values
boolgetFormat()
public
getFormat() : string
Return values
stringgetHeader()
public
getHeader() : array<string, string>
Return values
array<string, string>getHeight()
public
getHeight() : int|null
Return values
int|nullgetImage()
public
getImage() : GdImage
Return values
GdImagegetImageHeight()
public
getImageHeight() : int|null
Tags
Return values
int|nullgetImageProperty()
public
getImageProperty(string $name[, mixed $default = null ]) : mixed|null
Parameters
- $name : string
- $default : mixed = null
Return values
mixed|nullgetImageWidth()
public
getImageWidth() : int|null
Tags
Return values
int|nullgetMediaFilename()
public
getMediaFilename() : string
Return values
stringgetMediaPath()
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|nullgetSource()
public
getSource() : string
Return values
stringgetSourcePath()
Returns the current source path.
public
getSourcePath() : string
To get the original media path use getMediaPath()
instead.
Return values
stringgetWidth()
public
getWidth() : int|null
Return values
int|nullrefreshImageDimensions()
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