Source for file _base.php
Documentation is available at _base.php
// This file is part of the Sloodle project (www.sloodle.org) and is released under the GNU GPL v3.
* Defines the base class for all SLOODLE Plugins.
* @copyright Copyright (c) 2009 Sloodle (various contributors)
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @contributor Peter R. Bloomfield
* Base class for all SLOODLE plugins.
* All SLOODLE plugins should be derived from this (directly or indirectly).
* Specific plugin types will likely have their own base classes, which should be sub-classes of this.
* For example, the Presenter has plugin base classes for "slide" and "import" plugins.
* New plugins should be derived directly from those.
* Plugin classes should have names starting with "SloodlePlugin".
* Make sure your class name does not conflict with any existing plugin classes, even if it is a different type of plugin.
* Instantiating a plugin class should require no parameters, and should perform minimal processing. This is to allow the plugin loader to be as efficient as possible.
// OVERRIDABLE FUNCTIONS //
// These are functions which can be overridden by sub-classes.
* Gets the human-readable name of this plugin.
* This MUST be overridden by base classes. If not, it will just return the name of the class.
* @param string $lang Optional -- can specify the language we want the plugin name in, as an identifier like "en_utf8". If unspecified, then the current Moodle language should be used.
* @return string The human-readable name of this plugin
* Gets the human-readable description of this plugin.
* This should be overridden by base classes. If not, it will just return an empty string.
* @param string $lang Optional -- can specify the language we want the description in, as an identifier like "en_utf8". If unspecified, then the current Moodle language should be used.
* @return string The human-readable description of this plugin
* Gets the identifier of this plugin.
* This can be overridden, but should usually not be.
* This ID is just the name of the class
if (strpos($className, 'SloodlePlugin') ===
0) return substr($className, 13);
* Gets the internal version number of this plugin.
* This MUST be overridden.
* This should be a number like the internal version number for Moodle modules, containing the date and release number.
* For example, "2009012302" would be the 3rd release on the 23rd January 2009.
* @return int The version number of this module.
Documentation generated on Fri, 17 Jul 2009 11:02:50 +0100 by phpDocumentor 1.4.0