Methods

getName()

getName() : string

Returns the name of the package.

Returns

string —

Name

getAddon()

getAddon() : \rex_addon_interface

Returns the related Addon.

Returns

\rex_addon_interface —

getPackageId()

getPackageId() : string|null

Returns the package ID.

Returns

string|null —

getType()

getType() : string

Returns the package type as string.

Returns

string —

getPath()

getPath(string  $file = '') : string

Returns the base path.

Parameters

string $file

File

Returns

string —

getAssetsPath()

getAssetsPath(string  $file = '') : string

Returns the assets path.

Parameters

string $file

File

Returns

string —

getAssetsUrl()

getAssetsUrl(string  $file = '') : string

Returns the assets url.

Parameters

string $file

File

Returns

string —

getDataPath()

getDataPath(string  $file = '') : string

Returns the data path.

Parameters

string $file

File

Returns

string —

getCachePath()

getCachePath(string  $file = '') : string

Returns the cache path.

Parameters

string $file

File

Returns

string —

setConfig()

setConfig(mixed  $key, mixed  $value = null) : mixed

Parameters

mixed $key
mixed $value

Returns

mixed —

getConfig()

getConfig(mixed  $key = null, mixed  $default = null) : mixed

Parameters

mixed $key
mixed $default

Returns

mixed —

hasConfig()

hasConfig(mixed  $key = null) : mixed

Parameters

mixed $key

Returns

mixed —

removeConfig()

removeConfig(mixed  $key) : mixed

Parameters

mixed $key

Returns

mixed —

setProperty()

setProperty(string  $key, mixed  $value) : mixed

Sets a property.

Parameters

string $key

Key of the property

mixed $value

New value for the property

Returns

mixed —

getProperty()

getProperty(string  $key, mixed  $default = null) : mixed

Returns a property.

Parameters

string $key

Key of the property

mixed $default

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

Returns

mixed —

hasProperty()

hasProperty(string  $key) : bool

Returns if a property is set.

Parameters

string $key

Key of the property

Returns

bool —

removeProperty()

removeProperty(string  $key) : mixed

Removes a property.

Parameters

string $key

Key of the property

Returns

mixed —

isAvailable()

isAvailable() : bool

Returns if the package is available (activated and installed).

Returns

bool —

isInstalled()

isInstalled() : bool

Returns if the package is installed.

Returns

bool —

isSystemPackage()

isSystemPackage() : bool

Returns if it is a system package.

Returns

bool —

getAuthor()

getAuthor(string|null  $default = null) : string|null

Returns the author.

Parameters

string|null $default

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

Returns

string|null —

getVersion()

getVersion(string  $format = null) : string

Returns the version.

Parameters

string $format

See {@link}

Returns

string —

getSupportPage()

getSupportPage(string|null  $default = null) : string|null

Returns the supportpage.

Parameters

string|null $default

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

Returns

string|null —

includeFile()

includeFile(string  $file, array  $context = []) : mixed

Includes a file in the package context.

Parameters

string $file

Filename

array $context

Context values, available as variables in given file

Returns

mixed —

i18n()

i18n(string  $key, string|int  ...$replacements) : string

Adds the package prefix to the given key and returns the translation for it.

Parameters

string $key

Key

string|int $replacements variadic

A arbritary number of strings used for interpolating within the resolved messag

Returns

string —

Translation for the key