From 76dac45ebaf104b312a8527a05424601ca9d520a Mon Sep 17 00:00:00 2001 From: ewinslow Date: Mon, 6 Sep 2010 02:42:09 +0000 Subject: Refs #2220: Pulled most classes / interfaces out of lib files (except query.php and exception.php) into "classes" folder. Replaced inline classes with "require_once" statements for now. Ran unit tests to verify functionality before committing. git-svn-id: http://code.elgg.org/elgg/trunk@6908 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/plugins.php | 56 +------------------------------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) (limited to 'engine/lib/plugins.php') diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index c2427c655..e89e6007a 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -23,61 +23,7 @@ $ENABLED_PLUGINS_CACHE = NULL; */ class PluginException extends Exception {} -/** - * @class ElggPlugin Object representing a plugin's settings for a given site. - * This class is currently a stub, allowing a plugin to saving settings in an object's metadata for each site. - * @author Curverider Ltd - */ -class ElggPlugin extends ElggObject { - protected function initialise_attributes() { - parent::initialise_attributes(); - - $this->attributes['subtype'] = "plugin"; - } - - public function __construct($guid = null) { - parent::__construct($guid); - } - - /** - * Override entity get and sets in order to save data to private data store. - */ - public function get($name) { - // See if its in our base attribute - if (isset($this->attributes[$name])) { - return $this->attributes[$name]; - } - - // No, so see if its in the private data store. - // get_private_setting() returns false if it doesn't exist - $meta = get_private_setting($this->guid, $name); - - if ($meta === false) { - // Can't find it, so return null - return NULL; - } - - return $meta; - } - - /** - * Override entity get and sets in order to save data to private data store. - */ - public function set($name, $value) { - if (array_key_exists($name, $this->attributes)) { - // Check that we're not trying to change the guid! - if ((array_key_exists('guid', $this->attributes)) && ($name=='guid')) { - return false; - } - - $this->attributes[$name] = $value; - } else { - return set_private_setting($this->guid, $name, $value); - } - - return true; - } -} +require_once dirname(dirname(__FILE__)).'/classes/ElggPlugin.php'; /** * Returns a list of plugins to load, in the order that they should be loaded. -- cgit v1.2.3