Documentation

rex_addon extends rex_package
in package
implements rex_addon_interface

Class for addons.

Tags
author

gharlan

Interfaces, Classes, Traits and Enums

rex_addon_interface
Interface for addons.

Table of Contents

FILE_BOOT  = 'boot.php'
FILE_INSTALL  = 'install.php'
FILE_INSTALL_SQL  = 'install.sql'
FILE_PACKAGE  = 'package.yml'
FILE_UNINSTALL  = 'uninstall.php'
FILE_UNINSTALL_SQL  = 'uninstall.sql'
FILE_UPDATE  = 'update.php'
__construct()  : mixed
Constructor.
boot()  : mixed
clearCache()  : mixed
Clears the cache of the package.
enlist()  : mixed
exists()  : bool
Returns if the addon exists.
get()  : rex_addon_interface
Returns the addon by the given name.
getAddon()  : mixed
{@inheritdoc}
getAssetsPath()  : mixed
{@inheritdoc}
getAssetsUrl()  : mixed
{@inheritdoc}
getAuthor()  : string|null
Returns the author.
getAvailableAddons()  : array<string, self>
Returns the available addons.
getAvailablePackages()  : array<string, self>
Returns the available packages.
getAvailablePlugins()  : array<string, rex_plugin>
Returns the available plugins.
getCachePath()  : mixed
{@inheritdoc}
getConfig()  : mixed
getDataPath()  : mixed
{@inheritdoc}
getInstalledAddons()  : array<string, self>
Returns the installed addons.
getInstalledPackages()  : array<string, self>
Returns the installed packages.
getInstalledPlugins()  : array<string, rex_plugin>
Returns the installed plugins.
getName()  : string
Returns the name of the package.
getPackageId()  : string
Returns the package ID.
getPath()  : mixed
{@inheritdoc}
getPlugin()  : rex_plugin_interface
Returns the child plugin by the given name.
getProperty()  : mixed
Returns a property.
getRegisteredAddons()  : array<string, self>
Returns the registered addons.
getRegisteredPackages()  : array<string, self>
Returns the registered packages.
getRegisteredPlugins()  : array<string, rex_plugin>
Returns the registered plugins.
getSetupAddons()  : array<string, self>
Returns the setup addons.
getSetupPackages()  : array<string, self>
Returns the setup packages.
getSupportPage()  : string|null
Returns the supportpage.
getSystemAddons()  : array<string, self>
Returns the system addons.
getSystemPackages()  : array<string, self>
Returns the system packages.
getSystemPlugins()  : array<string, rex_plugin>
Returns the system plugins.
getType()  : mixed
{@inheritdoc}
getVersion()  : string
Returns the version.
hasConfig()  : mixed
hasProperty()  : bool
Returns if a property is set.
i18n()  : mixed
{@inheritdoc}
includeFile()  : mixed
Includes a file in the package context.
initialize()  : mixed
Initializes all packages.
isAvailable()  : bool
Returns if the package is available (activated and installed).
isInstalled()  : bool
Returns if the package is installed.
isSystemPackage()  : mixed
{@inheritdoc}
loadProperties()  : mixed
Loads the properties of package.yml.
pluginExists()  : bool
Returns if the plugin exists.
removeConfig()  : mixed
removeProperty()  : mixed
Removes a property.
require()  : self
Returns the addon by the given name.
requirePlugin()  : rex_plugin
Returns the child plugin by the given name.
setConfig()  : mixed
setProperty()  : mixed
Sets a property.
splitId()  : array<string|int, mixed>
Splits the package id into a tuple of addon id and plugin id (if existing).

Constants

FILE_BOOT

public mixed FILE_BOOT = 'boot.php'

FILE_INSTALL

public mixed FILE_INSTALL = 'install.php'

FILE_INSTALL_SQL

public mixed FILE_INSTALL_SQL = 'install.sql'

FILE_PACKAGE

public mixed FILE_PACKAGE = 'package.yml'

FILE_UNINSTALL

public mixed FILE_UNINSTALL = 'uninstall.php'

FILE_UNINSTALL_SQL

public mixed FILE_UNINSTALL_SQL = 'uninstall.sql'

FILE_UPDATE

public mixed FILE_UPDATE = 'update.php'

Methods

__construct()

Constructor.

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

Name

Return values
mixed

boot()

public boot() : mixed
Return values
mixed

enlist()

public enlist() : mixed
Return values
mixed

exists()

Returns if the addon exists.

public static exists(string $addon) : bool
Parameters
$addon : string

Name of the addon

Return values
bool

get()

Returns the addon by the given name.

public static get(string $addon) : rex_addon_interface
Parameters
$addon : string

Name of the addon

Tags
throws
InvalidArgumentException
Return values
rex_addon_interface

If the addon exists, a rex_addon is returned, otherwise a rex_null_addon

getAddon()

{@inheritdoc}

public getAddon() : mixed
Return values
mixed

getAssetsPath()

{@inheritdoc}

public getAssetsPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

getAssetsUrl()

{@inheritdoc}

public getAssetsUrl([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

getAuthor()

Returns the author.

public getAuthor([mixed $default = null ]) : string|null
Parameters
$default : mixed = null

Default value, will be returned if the property isn't set

Return values
string|null

getAvailableAddons()

Returns the available addons.

public static getAvailableAddons() : array<string, self>
Return values
array<string, self>

getAvailablePackages()

Returns the available packages.

public static getAvailablePackages() : array<string, self>
Return values
array<string, self>

getAvailablePlugins()

Returns the available plugins.

public getAvailablePlugins() : array<string, rex_plugin>
Return values
array<string, rex_plugin>

getCachePath()

{@inheritdoc}

public getCachePath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

getConfig()

public getConfig([mixed $key = null ][, mixed $default = null ]) : mixed
Parameters
$key : mixed = null
$default : mixed = null
Return values
mixed

getDataPath()

{@inheritdoc}

public getDataPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

getInstalledAddons()

Returns the installed addons.

public static getInstalledAddons() : array<string, self>
Return values
array<string, self>

getInstalledPackages()

Returns the installed packages.

public static getInstalledPackages() : array<string, self>
Return values
array<string, self>

getInstalledPlugins()

Returns the installed plugins.

public getInstalledPlugins() : array<string, rex_plugin>
Return values
array<string, rex_plugin>

getName()

Returns the name of the package.

public getName() : string
Return values
string

Name

getPackageId()

Returns the package ID.

public getPackageId() : string
Return values
string

getPath()

{@inheritdoc}

public getPath([mixed $file = '' ]) : mixed
Parameters
$file : mixed = ''
Return values
mixed

getProperty()

Returns a property.

public getProperty(mixed $key[, mixed $default = null ]) : mixed
Parameters
$key : mixed

Key of the property

$default : mixed = null

Default value, will be returned if the property isn't set

Return values
mixed

getRegisteredAddons()

Returns the registered addons.

public static getRegisteredAddons() : array<string, self>
Return values
array<string, self>

getRegisteredPackages()

Returns the registered packages.

public static getRegisteredPackages() : array<string, self>
Return values
array<string, self>

getRegisteredPlugins()

Returns the registered plugins.

public getRegisteredPlugins() : array<string, rex_plugin>
Return values
array<string, rex_plugin>

getSetupAddons()

Returns the setup addons.

public static getSetupAddons() : array<string, self>
Return values
array<string, self>

getSetupPackages()

Returns the setup packages.

public static getSetupPackages() : array<string, self>
Return values
array<string, self>

getSupportPage()

Returns the supportpage.

public getSupportPage([mixed $default = null ]) : string|null
Parameters
$default : mixed = null

Default value, will be returned if the property isn't set

Return values
string|null

getSystemAddons()

Returns the system addons.

public static getSystemAddons() : array<string, self>
Return values
array<string, self>

getSystemPackages()

Returns the system packages.

public static getSystemPackages() : array<string, self>
Return values
array<string, self>

getSystemPlugins()

Returns the system plugins.

public getSystemPlugins() : array<string, rex_plugin>
Return values
array<string, rex_plugin>

getType()

{@inheritdoc}

public getType() : mixed
Return values
mixed

getVersion()

Returns the version.

public getVersion([mixed $format = null ]) : string
Parameters
$format : mixed = null

See

Return values
string

hasConfig()

public hasConfig([mixed $key = null ]) : mixed
Parameters
$key : mixed = null
Return values
mixed

hasProperty()

Returns if a property is set.

public hasProperty(mixed $key) : bool
Parameters
$key : mixed

Key of the property

Return values
bool

i18n()

{@inheritdoc}

public i18n(mixed $key, mixed ...$replacements) : mixed
Parameters
$key : mixed
$replacements : mixed
Return values
mixed

includeFile()

Includes a file in the package context.

public includeFile(mixed $file[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
$file : mixed

Filename

$context : array<string|int, mixed> = []

Context values, available as variables in given file

Return values
mixed

initialize()

Initializes all packages.

public static initialize([mixed $dbExists = true ]) : mixed
Parameters
$dbExists : mixed = true
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()

{@inheritdoc}

public isSystemPackage() : mixed
Return values
mixed

loadProperties()

Loads the properties of package.yml.

public loadProperties() : mixed
Return values
mixed

pluginExists()

Returns if the plugin exists.

public pluginExists(mixed $plugin) : bool
Parameters
$plugin : mixed

Name of the plugin

Return values
bool

removeConfig()

public removeConfig(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

removeProperty()

Removes a property.

public removeProperty(mixed $key) : mixed
Parameters
$key : mixed

Key of the property

Return values
mixed

require()

Returns the addon by the given name.

public static require(string $addon) : self
Parameters
$addon : string
Tags
throws
RuntimeException

if the addon does not exist

Return values
self

requirePlugin()

Returns the child plugin by the given name.

public requirePlugin(string $plugin) : rex_plugin
Parameters
$plugin : string
Tags
throws
RuntimeException

if the plugin does not exist

Return values
rex_plugin

setConfig()

public setConfig(mixed $key[, mixed $value = null ]) : mixed
Parameters
$key : mixed
$value : mixed = null
Return values
mixed

setProperty()

Sets a property.

public setProperty(mixed $key, mixed $value) : mixed
Parameters
$key : mixed

Key of the property

$value : mixed

New value for the property

Return values
mixed

splitId()

Splits the package id into a tuple of addon id and plugin id (if existing).

public static splitId(string $packageId) : array<string|int, mixed>
Parameters
$packageId : string
Return values
array<string|int, mixed>

        

Search results