rex_media_manager
in package
Table of Contents
Constants
- STATUS_SYSTEM_TYPE = 1
- status of a system mediatyp.
Methods
- __construct() : mixed
- addEffect() : void
- create() : self
- Creates a rex_managed_media object for the given file and mediatype.
- deleteCache() : int
- deleteCacheByType() : int
-
effectsFromType()
: array<int, array{effect: string, params: array
}> - getCacheFilename() : string
- getCachePath() : string|null
- getHeaderCacheFilename() : string
- getMedia() : rex_managed_media
- getMediaFile() : string
- getMediaType() : string
- getSupportedEffects() : array<rex_effect_abstract>, string>
- getUrl() : string
- init() : void
- isCached() : bool
- mediaIsInUse() : array<int, string>
- Checks if media is used by this addon.
- mediaUpdated() : void
- sendMedia() : never
- setCacheDirectory() : void
- Set base cache directory for generated images.
- setCachePath() : void
- applyEffects() : void
- useCache() : void
Constants
STATUS_SYSTEM_TYPE
status of a system mediatyp.
public
int
STATUS_SYSTEM_TYPE
= 1
Methods
__construct()
public
__construct(rex_managed_media $media) : mixed
Parameters
- $media : rex_managed_media
addEffect()
public
static addEffect(rex_effect_abstract> $class) : void
Parameters
- $class : rex_effect_abstract>
create()
Creates a rex_managed_media object for the given file and mediatype.
public
static create(string $type, string $file) : self
This object might be used to determine the dimension of a image or similar.
Parameters
- $type : string
-
Media type
- $file : string
-
Media file
Return values
selfdeleteCache()
public
static deleteCache([string|null $filename = null ][, string|null $type = null ]) : int
Parameters
- $filename : string|null = null
- $type : string|null = null
Return values
intdeleteCacheByType()
public
static deleteCacheByType(int $typeId) : int
Parameters
- $typeId : int
Return values
inteffectsFromType()
public
effectsFromType(string $type) : array<int, array{effect: string, params: array}>
Parameters
- $type : string
Return values
array<int, array{effect: string, params: arraygetCacheFilename()
public
getCacheFilename() : string
Return values
stringgetCachePath()
public
getCachePath() : string|null
Return values
string|nullgetHeaderCacheFilename()
public
getHeaderCacheFilename() : string
Return values
stringgetMedia()
public
getMedia() : rex_managed_media
Return values
rex_managed_mediagetMediaFile()
public
static getMediaFile() : string
Return values
stringgetMediaType()
public
static getMediaType() : string
Return values
stringgetSupportedEffects()
public
static getSupportedEffects() : array<rex_effect_abstract>, string>
Return values
array<rex_effect_abstract>, string>getUrl()
public
static getUrl(string $type, string|rex_media $file[, int|null $timestamp = null ][, bool $escape = true ]) : string
Parameters
- $type : string
-
Media type
- $file : string|rex_media
-
Media file
- $timestamp : int|null = null
-
Last change timestamp of given file, for cache buster parameter (not nessary when the file is given by a
rex_media
object) - $escape : bool = true
Return values
stringinit()
public
static init() : void
isCached()
public
isCached() : bool
Return values
boolmediaIsInUse()
Checks if media is used by this addon.
public
static mediaIsInUse(rex_extension_point $ep) : array<int, string>
Parameters
- $ep : rex_extension_point
Return values
array<int, string> —Warning message as array
mediaUpdated()
public
static mediaUpdated(rex_extension_point $ep) : void
Parameters
- $ep : rex_extension_point
sendMedia()
public
sendMedia() : never
Return values
neversetCacheDirectory()
Set base cache directory for generated images.
public
static setCacheDirectory(string $path) : void
Parameters
- $path : string
setCachePath()
public
setCachePath([string $path = '' ]) : void
Parameters
- $path : string = ''
applyEffects()
protected
applyEffects(string $type) : void
Parameters
- $type : string
useCache()
protected
useCache([bool $useCache = true ]) : void
Parameters
- $useCache : bool = true