Class flModuleMgr
flModuleMgr Class
Class to manage modules, installation and removal.
Package: fusionLib
Copyright:
Copyright (c) 2012 - 2013 clearFusionCMS. All rights reserved.
Located at system/libs/Module/flModuleMgr.php
Methods summary
public
|
#
__construct( flDb $db )
Construct the object.
Parameters
|
public
string
|
#
getLastError( )
Return the last error.
Returns
string The last error string.
|
public
array
|
#
getInstalled( string $type = null )
Get a list of installed modules and the installed version number.
Get a list of installed modules and the installed version number.
Parameters
- $type
- The installed module time to find.
Returns
array The module name to installed version mapping.
|
public
array
|
#
getAvailable( )
Get the list of available modules.
Get the list of available modules.
Returns
array The names of the available modules.
|
public
boolean
|
#
install( string $module )
Install a module.
Parameters
- $module
- The name of the module to install.
Returns
boolean true if the module was installed; else false.
|
public
boolean
|
#
uninstall( string $module )
Uninstall a module.
Parameters
- $module
- The name of the module to uninstall.
Returns
boolean true if the module was uninstalled; else false.
Throws
|
public
|
#
upgrade( string $module )
Upgrade a module, throws an exception if the upgrade fails.
Upgrade a module, throws an exception if the upgrade fails.
Parameters
- $module
- The name of the module to upgrade.
Throws
|
public
flConfig
|
#
getInfo( string $module )
Get the module information.
Get the module information.
Parameters
- $module
- The name of the module to get the info for.
Returns
flConfig The module information of false if failed.
|
public
flModuleInstallInterface
|
#
getModuleInstaller( string $module )
Get a module installer object.
Get a module installer object.
Parameters
- $module
- The name of the module to get.
Returns
|
Properties summary
protected
flDb
|
$db
|
|
protected
string
|
$lastError
|
|