Class pluginset

Description

Pluginset class This class manages plugins as a set. It is designed for use by webpages, which can have many types of plugin content defined for them.

Located in /plugin-defs.php (line 268)


	
			
Variable Summary
 mixed $hascontent
 mixed $plugins
Method Summary
 pluginset pluginset ()
 void addto (string $pluginid, mixed $content)
 void add_plugin (string $pluginid, [mixed $content = ""])
 void clear ()
 void render ([mixed $template = ""])
Variables
mixed $hascontent = false (line 276)

Flag indicating whether plugins exist

mixed $plugins = array() (line 273)

Array of plugins in this set

Methods
Constructor pluginset (line 282)

Constructor Create a new plugin set. This is just a container for plugins.

pluginset pluginset ()
addto (line 315)

Adds content to the given plugin. If the plugin doesn't exist yet, then we create it first. If it already exists, then we append the new content to it.

void addto (string $pluginid, mixed $content)
  • string $pluginid: ID of this plugin. Used to find plugin location
  • mixed $content: The plugin content (literal, function, object...)
add_plugin (line 300)

Add a new plugin to the plugin set. The type of plugin is determined from the content passed as the second paramter. Allowed data-types for content: object (must inherit RenderableObject), a function definition, a file-path, or just literal content.

void add_plugin (string $pluginid, [mixed $content = ""])
  • string $pluginid: ID of this plugin. Used to find plugin location
  • mixed $content: The plugin content (literal, function, object...)
clear (line 287)

Clear all plugins from the set

void clear ()
render (line 334)

This method takes the given template, and renders the plugins on it one by one. Each plugin is applied to the template, replacing all occurences of the appropriate tag based on the pluginid. Then finally the resulting string is returned.

void render ([mixed $template = ""])

Documentation generated by phpDocumentor 1.3.0RC3