summaryrefslogtreecommitdiff
path: root/src/lib/PluginManager.class.php
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-09-22 00:45:02 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-09-22 00:45:02 -0400
commit485cc0fad823d50ed07df15f629ff824d2332ece (patch)
tree041655882fafa27cbcc4a431f33695c37fa10313 /src/lib/PluginManager.class.php
parentb58a642ab0463426b9f0d1d519bc5964b1453c3e (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.php7
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");
+ }
+
}