Class PluginManager

Description

PluginManager

This class is composed of static method to manage the SvgGrapher plugins. The methods are:

  • bool incl(string, string) inlude a plugin file
  • string exist(string, string) check if a plugin exist
  • mixed execute(string, string [, $args]) execute a plugin function
The two first parameters are always the plugin type (visual, dataprovider, etc) and the plugin name.

  • author: guillaume luchet <guillaume@geelweb.org>
  • version: $Id: PluginManager.php,v 1.4 2007/10/23 09:22:53 geelweb Exp $
  • copyright: Copyright (c) 2007, Guillaume Luchet
  • license: BSD License

Located in /mains/PluginManager.php (line 80)


	
			
Variable Summary
 static array $incl
 static array $pluginsPaths
Method Summary
 static mixed execute (string $type, string $name, [mixed $args = false])
 static string exist (mixed $type, mixed $name)
 static boolean incl (string $type, string $name)
Variables
static array $incl = array() (line 110)

incl

Array of plugins names already include for each plugins types.

  • access: public
static array $pluginsPaths = array(
'dataprovider' => SVGGRAPHER_PLUGINS_DATAPROVIDER,
'defs' => SVGGRAPHER_PLUGINS_DEFS,
'filter' => SVGGRAPHER_PLUGINS_FILTER,
'marker' => SVGGRAPHER_PLUGINS_MARKER,
'script' => SVGGRAPHER_PLUGINS_SCRIPT,
'visual' => SVGGRAPHER_PLUGINS_VISUAL)
(line 93)

pluginsPaths

Array of paths for plugins types.

  • access: public
Methods
static execute (line 189)

execute

Try to execute a plugin function, and return his result. Throw an exception if the plugin file or function can not be found.

  • access: public
static mixed execute (string $type, string $name, [mixed $args = false])
  • string $type: plugin type
  • string $name: plugin name
  • mixed $args: params to pass at the function
static exist (line 161)

exist

check if a plugin function exist, return the plugin function name if exist or throw an exception.

  • access: public
static string exist (mixed $type, mixed $name)
  • mixed $type: plugin type
  • mixed $name: plugin name
static incl (line 127)

incl

try to include a plugin file, return true if success or if the plugin is already been included. Throw an exception if the plugin is not found.

  • access: public
static boolean incl (string $type, string $name)
  • string $type: plugin type
  • string $name: plugin name

Documentation generated on Tue, 23 Oct 2007 11:32:05 +0200 by phpDocumentor 1.4.0