Class rex_package

Abstract base class for packages.

rex_package implements rex_package_interface

Direct known subclasses

rex_addon, rex_plugin

Abstract
Package: redaxo\core\packages
Author: gharlan
Located at redaxo/src/core/lib/packages/package.php

Methods summary

public
# __construct( string $name )

Constructor.

public static self
# get( string $packageId )

Returns the package (addon or plugin) by the given package id.

public static boolean
# exists( string $packageId )

Returns if the package exists.

public string
# getName( )

Returns the name of the package.

public
# setConfig( mixed $key, mixed $value = null )
public
# getConfig( mixed $key = null, mixed $default = null )
public
# hasConfig( mixed $key = null )
public
# removeConfig( mixed $key )
public
# setProperty( string $key, mixed $value )

Sets a property.

public mixed
# getProperty( string $key, mixed $default = null )

Returns a property.

public boolean
# hasProperty( string $key )

Returns if a property is set.

public
# removeProperty( string $key )

Removes a property.

public boolean
# isAvailable( )

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

public boolean
# isInstalled( )

Returns if the package is installed.

public mixed
# getAuthor( mixed $default = null )

Returns the author.

public mixed
# getVersion( string $format = null )

Returns the version.

public mixed
# getSupportPage( mixed $default = null )

Returns the supportpage.

public
# includeFile( string $__file, array $__context = [] )

Includes a file in the package context.

public
# loadProperties( )

Loads the properties of package.yml.

public
# clearCache( )

Clears the cache of the package.

public
# enlist( )
public
# boot( )
public static self[]
# getRegisteredPackages( )

Returns the registered packages.

public static self[]
# getInstalledPackages( )

Returns the installed packages.

public static self[]
# getAvailablePackages( )

Returns the available packages.

public static self[]
# getSetupPackages( )

Returns the setup packages.

public static self[]
# getSystemPackages( )

Returns the system packages.

Methods inherited from rex_package_interface

getAddon(), getAssetsPath(), getAssetsUrl(), getCachePath(), getDataPath(), getPackageId(), getPath(), getType(), i18n(), isSystemPackage()

Constants summary

string FILE_PACKAGE
#'package.yml'
string FILE_BOOT
#'boot.php'
string FILE_INSTALL
#'install.php'
string FILE_INSTALL_SQL
#'install.sql'
string FILE_UNINSTALL
#'uninstall.php'
string FILE_UNINSTALL_SQL
#'uninstall.sql'
string FILE_UPDATE
#'update.php'