Plugins

# Class: ServerProjectPostgresRouting Source Location: /projects/testproject/plugins/projectPostgresRouting/server/ServerProjectPostgresRouting.php
### Class Overview
    PluginBase
       |
       --ServerPlugin
          |
          --ClientResponderAdapter
             |
             --ServerRouting
                |
                --ServerPostgresRouting
                   |
                   --ServerProjectPostgresRouting
Example server routing plugin which uses Postgres | ### Methods initializeGraph replacePlugin
### Inherited Variables #### Class: ServerPostgresRouting ServerPostgresRouting::$db ServerPostgresRouting::$log #### Class: ServerRouting ServerRouting::$graph #### Class: ServerPlugin ServerPlugin::$config ServerPlugin::$serverContext #### Class: PluginBase PluginBase::$basePath PluginBase::$name PluginBase::$overriddenRequest | ### Inherited Methods #### Class: ServerPostgresRouting ServerPostgresRouting::__construct() Constructor ServerPostgresRouting::computePath() ServerPostgresRouting::convertNodeId() The default implementation will use the table format of the Pgdijkstra ServerPostgresRouting::deleteOldResults() Deletes the geometries on the results table which are too old ServerPostgresRouting::drawGraph() ServerPostgresRouting::getDb() Returns the Pear::DB database connection. ServerPostgresRouting::getNodes() This method iterates over the results returned by ServerPostgresRouting::shortestPathQuery() and fills the table containing the path geometries. ServerPostgresRouting::getRoutingResultsTable() ServerPostgresRouting::getRoutingTable() ServerPostgresRouting::initializeGraph() ServerPostgresRouting::mergeGraph() ServerPostgresRouting::recenter() Recenter the map on the path identified by the given results id. This method can be called by plugins for recentering. ServerPostgresRouting::serializeGraph() ServerPostgresRouting::shortestPathQuery() This methods performs a database query which will return the shortest path (see Pgdijkstra documentation for the API). ServerPostgresRouting::unserializeGraph() #### Class: ServerRouting ServerRouting::__construct() Constructor ServerRouting::addRoutingResultAttributes() Implementors may override this method to add routing attributes to the ServerRouting::computePath() Computes the shortest path between to nodes ServerRouting::computeRoutingResult() Compute a RoutingResult for a path described as an array of stops. This will call ServerRouting::computePath() repeatedly for each (source node, target node) pairs of the path, and merge the resulting RoutingResults togeter. ServerRouting::convertNodeId() Plugins may extent this method to convert stop identifiers sent by ServerRouting::drawGraph() Plugins should override this method to draw the computated graph object on the map. ServerRouting::handlePreDrawing() Result is set in initializeRequest but Outline must be called ServerRouting::initializeGraph() Plugins may override this method to do special treatment the very first time a routing computation is done. This will only called the first time the graph is drawn. ServerRouting::initializeRequest() ServerRouting::mergeGraph() When computing a path made of several stops, one graph is generated for each (startNode, endNode) pairs of the path. This method should merge two graphs into another one. ServerRouting::mergeRoutingResultGraph() Internal merging of the routing results ServerRouting::serializeGraph() Plugins should override this method to serialize the graph model object into a string, sent back to the client. The default implementation returns the object directly. ServerRouting::unserializeGraph() Plugins should override this method to unserialize the graph as a string sent by the client to the graph model object. #### Class: ClientResponderAdapter ClientResponderAdapter::handleDrawing() ClientResponderAdapter::handlePostDrawing() ClientResponderAdapter::handlePreDrawing() ClientResponderAdapter::initializeRequest() #### Class: ServerPlugin ServerPlugin::__construct() Constructor ServerPlugin::getConfig() ServerPlugin::getServerContext() ServerPlugin::initializeConfig() Initializes plugin configuration ServerPlugin::useExtendedInit() ServerPlugin::useExtendedRequest() ServerPlugin::useExtendedResult() #### Class: PluginBase PluginBase::__construct() Constructor PluginBase::account() Records an accounting message for plugins PluginBase::getBasePath() PluginBase::getExtendedName() PluginBase::getName() PluginBase::getRequest() Get plugin's request or result out of MapRequest or MapResult PluginBase::initialize() Plugin initialization (can be extended in custom plugins) PluginBase::initializeConfig() Initializes plugin PluginBase::preInitialize() Plugin pre initialization. In most cases, plugins should use PluginBase::replacePlugin() Returns name of parent plugin in case of plugin extension PluginBase::setBasePath() PluginBase::setExtendedName() PluginBase::setName()
### Class Details [line 29] Example server routing plugin which uses Postgres [ Top ] ### Class Methods ### method initializeGraph [line 34]
`void initializeGraph( mixed $graph)`
#### Tags:
access: | protected
see: | ServerRouting::initializeGraph()
Overrides ServerPostgresRouting::initializeGraph() (parent method not documented) [ Top ] ### method replacePlugin [line 42]
`void replacePlugin( )`
#### Tags:
access: | public
see: | PluginBase::replacePlugin()
Overrides PluginBase::replacePlugin() (Returns name of parent plugin in case of plugin extension) [ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:05 +0200 by phpDocumentor 1.3.0RC3