diff options
author | Andrew Dolgov <[email protected]> | 2012-12-23 15:29:16 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-23 15:29:16 +0400 |
commit | 5a0e03923f47bc1140fd71b4899cd1e35fd59006 (patch) | |
tree | 6ece4cb89259ac78f789d8ba630d328629ecbd01 /classes | |
parent | 7252abe3ea5703b3cf75a3745e560499cfde500a (diff) |
add and check plugin base class
Diffstat (limited to 'classes')
-rw-r--r-- | classes/plugin.php | 11 | ||||
-rw-r--r-- | classes/pluginhost.php | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/classes/plugin.php b/classes/plugin.php new file mode 100644 index 000000000..59cb64f53 --- /dev/null +++ b/classes/plugin.php @@ -0,0 +1,11 @@ +<?php +class Plugin { + private $link; + private $host; + + function __construct($host) { + $this->link = $host->get_link(); + $this->host = $host; + } +} +?> diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 4274ec37b..f4e01178b 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -59,7 +59,7 @@ class PluginHost { if (file_exists($file)) require_once $file; - if (class_exists($class)) { + if (class_exists($class) && is_subclass_of($class, "Plugin")) { $plugin = new $class($this); $this->register_plugin($class, $plugin); |