From 485cc0fad823d50ed07df15f629ff824d2332ece Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 22 Sep 2011 00:45:02 -0400 Subject: Implement actual plugin management. I was tired of doing the SQL queries by hand :) --- src/lib/PluginManager.class.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/PluginManager.class.php') 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"); + } + } -- cgit v1.2.3-2-g168b