Module Manager. More...
Public Member Functions | |
__construct ($path, $axiom_version, array $options=array()) | |
Constructor. | |
getModules () | |
Get available modules. | |
exists ($module) | |
Check if the module exists. | |
getInformations ($module) | |
Get module meta-inf. | |
load ($module) | |
Load the given module. | |
checkUpdates ($module) | |
Check if updates are available for the given module. | |
Data Fields | |
const | CACHE_FILE = "module.cache.php" |
Protected Member Functions | |
_getDependencies ($module) | |
Get the given module dependencies. | |
_checkDependencies ($module) | |
Check dependencies according to version numbers. | |
_loadDependencies ($module) | |
Load dependencies for the given module. | |
_cache () | |
Store modules informations for later use. | |
Static Protected Member Functions | |
static | _parseModuleVersion ($version) |
Parses a version to an integer. | |
static | _compareVersions ($version_a, $version_b) |
Check if the left version is higher than the right version. | |
Protected Attributes | |
$_path | |
Modules path. | |
$_axiomVersion | |
Axiom version. | |
$_options | |
Options. | |
$_modules | |
Module descriptors. |
Module Manager.
Definition at line 17 of file axModuleManager.class.php.
axModuleManager::__construct | ( | $ | path, |
$ | axiom_version, | ||
array $ | options = array() |
||
) |
Constructor.
Options:
string | $path | The path to the modules directory |
string | $axiom_version | Used during dependencies check |
array | $options | [optional] [default array() ] see above |
Definition at line 60 of file axModuleManager.class.php.
axModuleManager::_cache | ( | ) | [protected] |
Store modules informations for later use.
Will do nothing if cache is disabled
Definition at line 230 of file axModuleManager.class.php.
axModuleManager::_checkDependencies | ( | $ | module | ) | [protected] |
Check dependencies according to version numbers.
string | $module |
RuntimeException | If a module's meta-infs cannot be found |
Definition at line 178 of file axModuleManager.class.php.
static axModuleManager::_compareVersions | ( | $ | version_a, |
$ | version_b | ||
) | [static, protected] |
Check if the left version is higher than the right version.
Both parameters can be either strings or integer so these calls are equivalents:
self::_compareVersion('1.2.3', '1.0.2'); self::_compareVersion(100203, 100002);
mixed | $version_a | |
mixed | $version_b |
Definition at line 262 of file axModuleManager.class.php.
axModuleManager::_getDependencies | ( | $ | module | ) | [protected] |
Get the given module dependencies.
string | $module |
RuntimeException | If the module doesn't exists |
Definition at line 164 of file axModuleManager.class.php.
axModuleManager::_loadDependencies | ( | $ | module | ) | [protected] |
Load dependencies for the given module.
string | $module |
Definition at line 204 of file axModuleManager.class.php.
static axModuleManager::_parseModuleVersion | ( | $ | version | ) | [static, protected] |
Parses a version to an integer.
string | $version |
Definition at line 244 of file axModuleManager.class.php.
axModuleManager::checkUpdates | ( | $ | module | ) |
Check if updates are available for the given module.
string | $module |
Definition at line 154 of file axModuleManager.class.php.
axModuleManager::exists | ( | $ | module | ) |
Check if the module exists.
string | $module |
Definition at line 102 of file axModuleManager.class.php.
axModuleManager::getInformations | ( | $ | module | ) |
Get module meta-inf.
Wil return false in case of error.
string | $module |
Definition at line 114 of file axModuleManager.class.php.
axModuleManager::load | ( | $ | module | ) |
Load the given module.
string | $module |
Definition at line 133 of file axModuleManager.class.php.
string axModuleManager::$_axiomVersion [protected] |
Axiom version.
Definition at line 35 of file axModuleManager.class.php.
array axModuleManager::$_modules [protected] |
Module descriptors.
Definition at line 47 of file axModuleManager.class.php.
array axModuleManager::$_options [protected] |
Options.
Definition at line 41 of file axModuleManager.class.php.
string axModuleManager::$_path [protected] |
Modules path.
Definition at line 29 of file axModuleManager.class.php.
const axModuleManager::CACHE_FILE = "module.cache.php" |
Definition at line 23 of file axModuleManager.class.php.