/wp-content/plugins/broken-link-checker/includes/module-base.php
PHP | 73 lines | 21 code | 9 blank | 43 comment | 0 complexity | 89a5c2aa3b8f3878e0a53096f158414b MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1, AGPL-1.0
- <?php
- /**
- * @author Janis Elsts
- * @copyright 2010
- */
- /**
- * Base class for BLC modules.
- *
- * @package Broken Link Checker
- * @author Janis Elsts
- * @access public
- */
- class blcModule {
-
- var $module_id; //The ID of this module. Usually a lowercase string.
- var $cached_header; //An associative array containing the header data of the module file.
- /** @var blcConfigurationManager $plugin__conf */
- var $plugin_conf; //A reference to the plugin's global configuration object.
- var $module_manager; //A reference to the module manager.
-
- /**
- * Class constructor
- *
- * @param string $module_id
- * @param array $cached_header
- * @param blcConfigurationManager $plugin_conf
- * @param blcModuleManager $module_manager
- * @return void
- */
- function blcModule($module_id, $cached_header, &$plugin_conf, &$module_manager){
- $this->module_id = $module_id;
- $this->cached_header = $cached_header;
- $this->plugin_conf = &$plugin_conf;
- $this->module_manager = &$module_manager;
-
- $this->init();
- }
-
- /**
- * Module initializer. Called when the module is first instantiated.
- * The default implementation does nothing. Override it in a subclass to
- * specify some sort of start-up behaviour.
- *
- * @return void
- */
- function init(){
- //Should be overridden in a sub-class.
- }
-
- /**
- * Called when the module is activated.
- * Should be overridden in a sub-class.
- *
- * @return void
- */
- function activated(){
- //Should be overridden in a sub-class.
- }
-
- /**
- * Called when the module is deactivated.
- * Should be overridden in a sub-class.
- *
- * @return void
- */
- function deactivated(){
- //Should be overridden in a sub-class.
- }
- }
- ?>