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 54]



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 59]



Tags:

access:  private

Type:   ProjectHandler


[ Top ]

$replacePlugin =  NULL

[line 61]



Tags:

access:  private
static:  

Type:   mixed


[ Top ]

$rootPath =

[line 49]



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


constructor __construct [line 67]

PluginManager __construct( ProjectHandler $rootPath, mixed $kind, mixed $projectHandler)

Constructor



Tags:

access:  public


Parameters:

ProjectHandler   $rootPath  

[ Top ]

method callPluginImplementing [line 255]

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 297]

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 283]

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 97]

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 140]

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 126]

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 325]

PluginBase getCurrentPlugin( )

Returns current plugin objet

Plugin name is found using URL.




Tags:

access:  public


[ Top ]

method getPlugin [line 309]

PluginBase getPlugin( string $pluginName)

Returns plugin object for a plugin name



Tags:

access:  public


Parameters:

string   $pluginName   name

[ Top ]

method getPluginFilename [line 109]

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 87]

array getPlugins( )

Returns the plugins objects list.



Tags:

access:  public


[ Top ]

method getRelativePath [line 153]

void getRelativePath( mixed $name)

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

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




Tags:

access:  public


[ Top ]

method includeClassFiles [line 164]

void includeClassFiles( string $name)

Tries to include plugin PHP scripts



Tags:

access:  private


Parameters:

string   $name   plugin name

[ Top ]

method loadPlugins [line 187]

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 79]

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 Wed, 6 Apr 2005 12:06:50 +0200 by phpDocumentor 1.3.0RC3