rex_plugin_interface
extends
rex_package_interface
in
Interface for plugins.
Tags
Table of Contents
- getAddon() : rex_addon_interface
- Returns the related Addon.
- getAssetsPath() : string
- Returns the assets path.
- getAssetsUrl() : string
- Returns the assets url.
- getAuthor() : string|null
- Returns the author.
- getCachePath() : string
- Returns the cache path.
- getConfig() : mixed
- getDataPath() : string
- Returns the data path.
- getName() : string
- Returns the name of the package.
- getPackageId() : string|null
- Returns the package ID.
- getPath() : string
- Returns the base path.
- getProperty() : mixed
- Returns a property.
- getSupportPage() : string|null
- Returns the supportpage.
- getType() : mixed
- Returns the package type as string.
- getVersion() : string
- Returns the version.
- hasConfig() : mixed
- hasProperty() : bool
- Returns if a property is set.
- i18n() : string
- Adds the package prefix to the given key and returns the translation for it.
- includeFile() : mixed
- Includes a file in the package context.
- isAvailable() : bool
- Returns if the package is available (activated and installed).
- isInstalled() : bool
- Returns if the package is installed.
- isSystemPackage() : bool
- Returns if it is a system package.
- removeConfig() : mixed
- removeProperty() : mixed
- Removes a property.
- setConfig() : mixed
- setProperty() : mixed
- Sets a property.
Methods
getAddon()
Returns the related Addon.
public
getAddon() : rex_addon_interface
Return values
rex_addon_interface —getAssetsPath()
Returns the assets path.
public
getAssetsPath([string $file = '' ]) : string
Parameters
- $file : string = ''
-
File
Return values
string —getAssetsUrl()
Returns the assets url.
public
getAssetsUrl([string $file = '' ]) : string
Parameters
- $file : string = ''
-
File
Return values
string —getAuthor()
Returns the author.
public
getAuthor([string|null $default = null ]) : string|null
Parameters
- $default : string|null = null
-
Default value, will be returned if the property isn't set
Return values
string|null —getCachePath()
Returns the cache path.
public
getCachePath([string $file = '' ]) : string
Parameters
- $file : string = ''
-
File
Return values
string —getConfig()
public
getConfig([mixed $key = null ][, mixed $default = null ]) : mixed
Parameters
- $key : mixed = null
- $default : mixed = null
Tags
Return values
mixed —getDataPath()
Returns the data path.
public
getDataPath([string $file = '' ]) : string
Parameters
- $file : string = ''
-
File
Return values
string —getName()
Returns the name of the package.
public
getName() : string
Return values
string —Name
getPackageId()
Returns the package ID.
public
getPackageId() : string|null
Return values
string|null —getPath()
Returns the base path.
public
getPath([string $file = '' ]) : string
Parameters
- $file : string = ''
-
File
Return values
string —getProperty()
Returns a property.
public
getProperty(string $key[, mixed $default = null ]) : mixed
Parameters
- $key : string
-
Key of the property
- $default : mixed = null
-
Default value, will be returned if the property isn't set
Return values
mixed —getSupportPage()
Returns the supportpage.
public
getSupportPage([string|null $default = null ]) : string|null
Parameters
- $default : string|null = null
-
Default value, will be returned if the property isn't set
Return values
string|null —getType()
Returns the package type as string.
public
getType() : mixed
Return values
mixed —getVersion()
Returns the version.
public
getVersion([string $format = null ]) : string
Parameters
Return values
string —hasConfig()
public
hasConfig([mixed $key = null ]) : mixed
Parameters
- $key : mixed = null
Tags
Return values
mixed —hasProperty()
Returns if a property is set.
public
hasProperty(string $key) : bool
Parameters
- $key : string
-
Key of the property
Return values
bool —i18n()
Adds the package prefix to the given key and returns the translation for it.
public
i18n(string $key, string|int ...$replacements) : string
Parameters
- $key : string
-
Key
- $replacements : string|int
-
A arbritary number of strings used for interpolating within the resolved messag
Return values
string —Translation for the key
includeFile()
Includes a file in the package context.
public
includeFile(string $file[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
- $file : string
-
Filename
- $context : array<string|int, mixed> = []
-
Context values, available as variables in given file
Return values
mixed —isAvailable()
Returns if the package is available (activated and installed).
public
isAvailable() : bool
Return values
bool —isInstalled()
Returns if the package is installed.
public
isInstalled() : bool
Return values
bool —isSystemPackage()
Returns if it is a system package.
public
isSystemPackage() : bool
Return values
bool —removeConfig()
public
removeConfig(mixed $key) : mixed
Parameters
- $key : mixed
Tags
Return values
mixed —removeProperty()
Removes a property.
public
removeProperty(string $key) : mixed
Parameters
- $key : string
-
Key of the property
Return values
mixed —setConfig()
public
setConfig(mixed $key[, mixed $value = null ]) : mixed
Parameters
- $key : mixed
- $value : mixed = null
Tags
Return values
mixed —setProperty()
Sets a property.
public
setProperty(string $key, mixed $value) : mixed
Parameters
- $key : string
-
Key of the property
- $value : mixed
-
New value for the property