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 base classes for SLOODLE Presenter 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 plugins which provide slide types for the SLOODLE Presenter.
* Sub-classes should override the essential functions, in addition to those in the SloodlePluginBase class.
* The purpose of the plugin is to render slides for output to a browser or to SL.
// OVERRIDABLE FUNCTIONS //
// These are functions which can be overridden by sub-classes.
* Render the given slide for browser output -- NOTE: render to a string, and return the string.
* The title of the slide need not be included -- simply the basic iFrame or embedded player etc.
* @param SloodlePresenterSlide $slide An object containing the raw slide data.
// In case this function isn't overridden, just output a basic link.
$output =
"<a href=\"{$slide->source}\" title=\"\">
".
get_string('directlink', 'sloodle').
"</a>";
* Render the given slide for virtual-world output.
* This returns two items of data in a numeric array.
* The first is the virtual world compatible type identifier: web, image, video, or audio (or a mime type).
* The second is the absolute URL to give it.
* @param SloodlePresenterSlide $slide An object containing the raw slide data.
* @return array Numeric array containg (type, url)
// In case this function isn't overridden, just output a basic web URL
return array('web', $slide->source);
* Base class for plugins which provide slide importers for the SLOODLE Presenter.
* Sub-classes should override the essential functions, in addition to those in the SloodlePluginBase class.
* The purpose of the plugin is to take a specified file (locally), process it, and add slides to the Presentation at the given point.
// OVERRIDABLE FUNCTIONS //
// These are functions which can be overridden by sub-classes.
* Import the given file, and insert the new slides at the specified position in the Presentation.
* The best approach to inserting slides is to insert the first one at the specified position,
* and then increment the position on each insertion.
* Inserting at the same point repeatedly will cause the slides to appear in reverse order! :-)
* @param string $file The path of the file to import.
* @param int $position Position at which the first new slide should be imported. (If negative, then insert at end)
* @return bool True if successful, or false otherwise.
function import($file, $position = -
1)
Documentation generated on Fri, 17 Jul 2009 11:02:49 +0100 by phpDocumentor 1.4.0