Common
[ class tree: Common ] [ index: Common ] [ all elements ]

Class: PluginManager

Source Location: /common/PluginManager.php

Class Overview


Class used to manage pool of plugins


Variables

Constants

Methods



Class Details

[line 28]
Class used to manage pool of plugins



[ Top ]


Class Variables

$helpers = array()

[line 44]



Tags:

access:  private

Type:   mixed


[ Top ]

$kind =

[line 49]



Tags:

access:  private

Type:   int


[ Top ]

$log =

[line 33]



Tags:

access:  private

Type:   Logger


[ Top ]

$plugins = array()

[line 42]

Plugin objects storage



Tags:

access:  private

Type:   array


[ Top ]

$projectHandler =

[line 54]



Tags:

access:  private

Type:   ProjectHandler


[ Top ]

$replacePlugin =  NULL

[line 56]



Tags:

access:  private
static:  

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 62]

PluginManager __construct( ProjectHandler $kind, mixed $projectHandler)

Constructor



Tags:

access:  public


Parameters:

ProjectHandler   $kind  

[ Top ]

method callEnabledPluginImplementing [line 298]

void callEnabledPluginImplementing( string $enableLevel, string $pluginName, array $interface, mixed $functionName, [mixed $args = array()])

Calls a function on a plugin implementing an interface IF the plugin is enabled.

An enabled plugin is a plugin whose enableLevel property value is bigger or equal to the given $enableLevel argument.




Tags:

access:  public


Parameters:

string   $enableLevel   interface name
string   $pluginName   function name
array   $interface   function arguments

[ Top ]

method callEnabledPluginsImplementing [line 314]

void callEnabledPluginsImplementing( string $enableLevel, string $interface, array $functionName, [mixed $args = array()])

Calls a function on enabled plugins implementing an interface.



Tags:

access:  public


Parameters:

string   $enableLevel   interface name
string   $interface   function name
array   $functionName   function arguments

[ Top ]

method callPluginImplementing [line 249]

void callPluginImplementing( PluginBase $plugin, string $interface, string $functionName, [array $args = array()])

Calls a function on the given plugin that implements the given interface.



Tags:

access:  public


Parameters:

PluginBase   $plugin  
string   $interface   interface name
string   $functionName   function name
array   $args   function arguments

[ Top ]

method callPlugins [line 330]

void callPlugins( string $functionName, [array $args = array()])

Calls a function on plugins



Tags:

access:  public


Parameters:

string   $functionName   function name
array   $args   function arguments

[ Top ]

method callPluginsImplementing [line 280]

void callPluginsImplementing( string $interface, string $functionName, [array $args = array()])

Calls a function on plugins implementing an interface



Tags:

access:  public


Parameters:

string   $interface   interface name
string   $functionName   function name
array   $args   function arguments

[ Top ]

method getBasePluginPath [line 91]

string getBasePluginPath( string $relativePath, string $name)

Returns full plugin base path



Tags:

access:  private


Parameters:

string   $relativePath   path to plugins root
string   $name   plugin name

[ Top ]

method getClassName [line 134]

string getClassName( string $name)

Constructs a plugin class name

Class names are in the form ClientMyPlugin or ServerMyPlugin.




Tags:

access:  private


Parameters:

string   $name  

[ Top ]

method getCommonPath [line 120]

string getCommonPath( string $relativePath, string $name)

Returns plugin's common file path

Also depends on the project.




Tags:

access:  private


Parameters:

string   $relativePath   path to plugins root
string   $name   plugin name

[ Top ]

method getCurrentPlugin [line 361]

PluginBase getCurrentPlugin( )

Returns current plugin objet

Plugin name is found using URL.




Tags:

access:  public
deprecated:  This method is deprecated and should not be used any more. See the corresponding page on how to update your plugin.


[ Top ]

method getPlugin [line 343]

PluginBase getPlugin( string $pluginName)

Returns plugin object for a plugin name or NULL if this plugin

is not loaded




Tags:

access:  public


Parameters:

string   $pluginName   name

[ Top ]

method getPluginFilename [line 103]

string getPluginFilename( string $relativePath, string $name)

Returns plugin's main class file name

Also depends on the project.




Tags:

access:  private


Parameters:

string   $relativePath   path to plugins root
string   $name   plugin name

[ Top ]

method getPlugins [line 81]

array getPlugins( )

Returns the plugins objects list.



Tags:

access:  public


[ Top ]

method getRelativePath [line 147]

void getRelativePath( mixed $name)

Returns the relative path to the plugin parent directory. The directory layout is as follow:

CARTOWEB_HOME / relativePath / pluginName / {client,common,server,...}




Tags:

access:  public


[ Top ]

method includeClassFiles [line 158]

void includeClassFiles( string $name)

Tries to include plugin PHP scripts



Tags:

access:  private


Parameters:

string   $name   plugin name

[ Top ]

method loadPlugins [line 181]

void loadPlugins( array $names, [mixed $initArgs = NULL])

Loads plugins

Includes all plugin files and creates plugin object.




Tags:

access:  public


Parameters:

array   $names   array of plugin names
mixed   $initArgs   optional initialization arguments

[ Top ]

method replacePlugin [line 73]

void replacePlugin( string $name)

Tells what plugin the current one replaces.



Tags:

access:  public
static:  


Parameters:

string   $name   replacement plugin name

[ Top ]


Class Constants

CLIENT =  1

[line 35]


[ Top ]

SERVER =  2

[line 36]


[ Top ]



Documentation generated on Fri, 21 Sep 2007 13:30:56 +0200 by phpDocumentor 1.3.0RC3