diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-09-22 00:45:02 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-09-22 00:45:02 -0400 |
commit | 485cc0fad823d50ed07df15f629ff824d2332ece (patch) | |
tree | 041655882fafa27cbcc4a431f33695c37fa10313 /src/lib/PluginManager.class.php | |
parent | b58a642ab0463426b9f0d1d519bc5964b1453c3e (diff) |
Implement actual plugin management. I was tired of doing the SQL queries by hand :)
Diffstat (limited to 'src/lib/PluginManager.class.php')
-rw-r--r-- | src/lib/PluginManager.class.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/PluginManager.class.php b/src/lib/PluginManager.class.php index 417eecc..2e3dd2b 100644 --- a/src/lib/PluginManager.class.php +++ b/src/lib/PluginManager.class.php @@ -3,6 +3,7 @@ class PluginManager { public $plugins = array(); private $loaded = false; + /** * Return an instance of the plugin with $plugin_name */ @@ -87,4 +88,10 @@ class PluginManager { } return $ret; } + + public function staticHook($plugin_name, $hook) { + require_once("$plugin_name.class.php"); + return call_user_func("$plugin_name::$hook"); + } + } |