Modules

Summary
Modules
AuthorJaybill McCarthy
Licensehttp://communit.as/docs/license
See AlsoCts_Db_Table_Abstract
Instance Variables
$_nameThe name of the table or view to interact with in the data source.
$_primaryThe primary key of the table or view to interact with in the data source.
$_parsed_ini
$errors
$success
$notice
Instance Methods
existsVerifies the existence of a module.
See Also
getEnabledModulesReturns a list of modules which are set as enabled in the database.
isEnabledVerifies the enabled status of a module.
enableEnables a module.
disableThe ID of the module to disable.
installInstalls a module.
uninstallUninstalls a module.
parseIniParses an module.ini file for a given module.
setDefaultConfig
upgradeDatabaseUpgrades the database components for a given module to the latest version for that module.
setup
Private or Protected Methods
runFilterExecutes a filter.

Author

Jaybill McCarthy

Instance Variables

$_name

protected $_name

The name of the table or view to interact with in the data source.

$_primary

protected $_primary

The primary key of the table or view to interact with in the data source.

$_parsed_ini

protected $_parsed_ini

$errors

public $errors

$success

public $success

$notice

public $notice

Instance Methods

exists

Verifies the existence of a module.  This method does not check whether the module is installed or enabled.  To check whether a module is enabled, use isEnabled.

Arguments

module_idThe ID of the module for which to verify its existence.

Returns: boolean

See Also

getEnabledModules

function getEnabledModules($include_default =  true)

Returns a list of modules which are set as enabled in the database.

Arguments

include_defaultA boolean to indicate if the default module should be included in the returned array.  Default is true.

Returns: array

isEnabled

function isEnabled($module_id)

Verifies the enabled status of a module.  Does not necessarily verify whether a module exists or is installed, but inherently, if a module comes up positive for being enabled, then it does exist and has been installed.

Arguments

module_idThe ID of the module for which to verify its enabled status.

Returns: boolean

enable

function enable($module_id)

Enables a module.

Arguments

module_idThe ID of the module to enable.

Returns: boolean indicating whether the filter was successfully executed

disable

function disable($module_id)

Arguments

The ID of the module to disable.

Returns: boolean indicating whether the filter was successfully executed

install

function install($module_id)

Installs a module.  The module files must be placed in the modules directory for it to be installable.  Installation should typically be done using the modules screen in the admin tools.

Arguments

module_idThe ID of the module to install.

Returns: boolean indicating whether the filter was successfully executed

uninstall

function uninstall($module_id)

Uninstalls a module.

Arguments

module_idThe ID of the module to uninstall.

Returns: boolean indicating whether the filter was successfully executed

parseIni

function parseIni($module_id)

Parses an module.ini file for a given module.

Arguments

module_idThe ID of the module for which to parse the INI file.

Returns: an array representing the parsed config file

setDefaultConfig

function setDefaultConfig($module_id)

Arguments

module_idTBD

Returns: void

upgradeDatabase

function upgradeDatabase($module_id)

Upgrades the database components for a given module to the latest version for that module.

Arguments

module_idThe ID of the module for which to upgrade the database to the latest version.

Returns: void

setup

function setup($module_id)

Arguments

module_idThe ID of the module for which to set up.

Returns: void

Private or Protected Methods

runFilter

private function runFilter($filter_name)

Executes a filter.

Arguments

filter_nameThe name of the filter to execute.

Returns: boolean

protected $_name
The name of the table or view to interact with in the data source.
protected $_primary
The primary key of the table or view to interact with in the data source.
protected $_parsed_ini
public $errors
public $success
public $notice
function getEnabledModules($include_default =  true)
Returns a list of modules which are set as enabled in the database.
function isEnabled($module_id)
Verifies the enabled status of a module.
function enable($module_id)
Enables a module.
function disable($module_id)
The ID of the module to disable.
function install($module_id)
Installs a module.
function uninstall($module_id)
Uninstalls a module.
function parseIni($module_id)
Parses an module.ini file for a given module.
function setDefaultConfig($module_id)
function upgradeDatabase($module_id)
Upgrades the database components for a given module to the latest version for that module.
function setup($module_id)
private function runFilter($filter_name)
Executes a filter.
Close