Documentation

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

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
self

deleteCache()

public static deleteCache([string|null $filename = null ][, string|null $type = null ]) : int
Parameters
$filename : string|null = null
$type : string|null = null
Return values
int

deleteCacheByType()

public static deleteCacheByType(int $typeId) : int
Parameters
$typeId : int
Return values
int

effectsFromType()

public effectsFromType(string $type) : array<int, array{effect: string, params: array}>
Parameters
$type : string
Return values
array<int, array{effect: string, params: array}>

getCacheFilename()

public getCacheFilename() : string
Return values
string

getCachePath()

public getCachePath() : string|null
Return values
string|null

getHeaderCacheFilename()

public getHeaderCacheFilename() : string
Return values
string

getMediaFile()

public static getMediaFile() : string
Return values
string

getMediaType()

public static getMediaType() : string
Return values
string

getSupportedEffects()

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
string

setCacheDirectory()

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

        
On this page

Search results