Common

# Class: PluginBase Source Location: /common/PluginBase.php
### Class Overview
Base class for plugins #### Author(s): | ### Variables $basePath $log $name $overriddenRequest | ### Methods __construct account getBasePath getExtendedName getName getRequest initialize initializeConfig preInitialize replacePlugin setBasePath setExtendedName setName
### Child classes: ClientPlugin Client plugin ServerPlugin Server plugin
### Class Details [line 28] Base class for plugins #### Tags:
abstract: |
[ Top ] ### Class Variables #### $basePath = [line 39] Root path for plugin files #### Tags:
access: | private
Type: | string
[ Top ] #### $log = [line 33] #### Tags:
access: | private
Type: | Logger
[ Top ] #### $name = [line 44] #### Tags:
access: | private
Type: | string
[ Top ] #### $overriddenRequest = [line 50] Request overridden by other plugin #### Tags:
access: | public
Type: | mixed
[ Top ] ### Class Methods ### constructor __construct [line 55]
`PluginBase __construct( )`
Constructor #### Tags:
access: | public
Overridden in child classes as: ClientPlugin::__construct() Constructor ClientExportHtml::__construct() Constructor ClientExportCsv::__construct() Constructor ClientExportDxf::__construct() Constructor ClientExportPdf::__construct() Constructor ClientExportRtf::__construct() Constructor ClientViews::__construct() Constructor ClientBboxHistory::__construct() Constructor ClientOutline::__construct() Constructor ClientGeostat::__construct() ClientLocate::__construct() Constructor ClientExportImg::__construct() Constructor ClientAccounting::__construct() Constructor ClientOgcLayerLoader::__construct() Constructor ClientEdit::__construct() Constructor ClientWmsBrowserLight::__construct() Constructor ClientLayerReorder::__construct() Constructor ClientRouting::__construct() Constructor ClientDemoRouting::__construct() Constructor ClientToolTips::__construct() Constructor ClientQuery::__construct() Constructor ClientLayers::__construct() Constructor ClientStatictools::__construct() Constructor ClientLocation::__construct() Constructor ClientTables::__construct() Constructor ClientImages::__construct() Constructor ClientProjectplugin::__construct() Constructor ClientProjectTableRules::__construct() Constructor ClientHello::__construct() Constructor ClientTestMainTableRules::__construct() Constructor ServerPlugin::__construct() Constructor ServerOutline::__construct() Constructor ServerGeostat::__construct() ServerOgcLayerLoader::__construct() Constructor ServerEdit::__construct() Constructor ServerLayerReorder::__construct() Constructor ServerRouting::__construct() Constructor ServerTestMainGeotoolsRouting::__construct() Constructor ServerProjectGeotoolsRouting::__construct() Constructor ServerPostgresRouting::__construct() Constructor ServerQuery::__construct() Constructor ServerLayers::__construct() Constructor ServerLocation::__construct() Constructor ServerImages::__construct() Constructor ServerProjectplugin::__construct() Constructor ServerProjectTable::__construct() Constructor ServerExportPdf::__construct() Constructor ServerAccounting::__construct() Constructor ServerHilight::__construct() Constructor ServerMapOverlay::__construct() Constructor ServerMapquery::__construct() Constructor ServerTables::__construct() Constructor ServerProjectTableRules::__construct() Constructor [ Top ] ### method account [line 154]
`void account( string $pluginLabel, string $message)`
Records an accounting message for plugins #### Tags:
access: | public
#### Parameters:
string | $pluginLabel | the label to identify the accounting information. The final label will be scoped with the name of the current plugin.
string | $message | accounting data
[ Top ] ### method getBasePath [line 71]
`string getBasePath( )`
#### Tags:
access: | public
[ Top ] ### method getExtendedName [line 108]
`string getExtendedName( )`
#### Tags:
access: | public
[ Top ] ### method getName [line 94]
`string getName( )`
#### Tags:
access: | public
[ Top ] ### method getRequest [line 124]
`mixed getRequest( boolean $isRequest, mixed $mapRequest)`
Get plugin's request or result out of MapRequest or MapResult The name of the request|result field is selected according to this current plugin name (see getName()). Although this is called getRequest, it is not tied to a request. Unserialization is done globally (not for each plugin). #### Tags:
return: | mapRequest|Result or NULL if no such request|result
access: | public
#### Parameters:
boolean | $isRequest | true if a mapRequest, false if mapResult
mixed | $mapRequest | mapRequest or mapResult
[ Top ] ### method initialize [line 172]
`void initialize( )`
Plugin initialization (can be extended in custom plugins) #### Tags:
access: | public
Overridden in child classes as: ClientExportDxf::initialize() ClientSearch::initialize() ClientAccounting::initialize() ClientOgcLayerLoader::initialize() ClientAuth::initialize() ClientWmsBrowserLight::initialize() You need the ogcLayerLoader in order to add the layer to your project. ClientProjectplugin::initialize() ClientProjectTableRules::initialize() ClientCheckInstall::initialize() ClientTestMainTableRules::initialize() Here comes all the client-side rules. ServerSearch::initialize() ServerProjectTableRules::initialize() [ Top ] ### method initializeConfig [line 66]
`void initializeConfig( mixed $initArgs)`
Initializes plugin Internal call, use PluginBase::initialize() to extend initialization in custom plugins. #### Tags:
access: | public
abstract: |
Overridden in child classes as: ClientPlugin::initializeConfig() Initializes plugin configuration ServerPlugin::initializeConfig() Initializes plugin configuration #### Parameters:
mixed | $initArgs |
[ Top ] ### method preInitialize [line 167]
`void preInitialize( )`
Plugin pre initialization. In most cases, plugins should use #### Tags:
access: | public
see: | PluginBase::initialize(). This method should be overriden when a plugin has to change properties which will impact the Cartoclient core objects initialization. The typical example is for plugins changing the current mapId using ClientConfig::setMapId().
[ Top ] ### method replacePlugin [line 143]
`string replacePlugin( )`
Returns name of parent plugin in case of plugin extension Must be overridden in child plugin class #### Tags:
access: | public
Overridden in child classes as: ClientDemoRouting::replacePlugin() ClientProjectToolTips::replacePlugin() ClientProjectLocation::replacePlugin() ClientTestMainLocation::replacePlugin() Tells that this plugin should be used instead of plugin 'location'. ServerTestMainGeotoolsRouting::replacePlugin() ServerProjectGeotoolsRouting::replacePlugin() ServerTestMainPostgresRouting::replacePlugin() ServerProjectPostgresRouting::replacePlugin() ServerDemoRouting::replacePlugin() ServerTestMainRouting::replacePlugin() ServerProjectRouting::replacePlugin() ServerProjectLocation::replacePlugin() [ Top ] ### method setBasePath [line 80]
`void setBasePath( string $basePath)`
#### Tags:
access: | public
#### Parameters:
string | $basePath |
[ Top ] ### method setExtendedName [line 101]
`void setExtendedName( string $extendedName)`
#### Tags:
access: | public
#### Parameters:
string | $extendedName |
[ Top ] ### method setName [line 87]
`void setName( string $name)`
#### Tags:
access: | public
#### Parameters:
string | $name |
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:56 +0200 by phpDocumentor 1.3.0RC3