Last active
January 1, 2016 13:39
-
-
Save thefuxia/8152820 to your computer and use it in GitHub Desktop.
interface Mlp_Module_Manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Module_Manager { | |
/** | |
* Register a module. | |
* | |
* @param array $module Required: slug, description and display_name | |
* @return bool TRUE if the module is active, FALSE if it isn't. | |
*/ | |
public function register( Array $module ); | |
/** | |
* Remove a module from list. Does not remove the entry in the option. | |
* | |
* @param string $slug | |
*/ | |
public function unregister( $slug ); | |
/** | |
* Check whether a module is active. | |
* | |
* @param string $slug | |
* @return bool | |
*/ | |
public function is_active( $slug ); | |
/** | |
* Update activation status of a module. | |
* | |
* @param string $slug | |
* @return array | |
*/ | |
public function activate( $slug ); | |
/** | |
* Deactivate a module | |
* | |
* @param string $slug | |
*/ | |
public function deactivate( $slug ); | |
/** | |
* Update one single module. | |
* | |
* @param string $slug | |
* @param string $key | |
* @param string $value | |
* @return array Complete module data. | |
*/ | |
public function update_module( $slug, $key, $value ); | |
/** | |
* Get all modules or specific states. | |
* | |
* @param string $status 'all', 'active' or 'inactive'. | |
* @return array | |
*/ | |
public function get_modules( $status = 'all' ); | |
/** | |
* Get all data of one module. | |
* | |
* @param string $slug | |
* @return array | |
*/ | |
public function get_module( $slug ); | |
/** | |
* Check if we have any registered modules. | |
* | |
* @return bool | |
*/ | |
public function has_modules(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment