Plugins

# Class: ServerTestMainRouting Source Location: /projects/test_main/plugins/testMainRouting/server/ServerTestMainRouting.php
### Class Overview
    PluginBase
       |
       --ServerPlugin
          |
          --ClientResponderAdapter
             |
             --ServerRouting
                |
                --ServerTestMainRouting
| ### Methods convertNodeIds drawRoutingResult replacePlugin
### Inherited Variables #### Class: ServerRouting ServerRouting::$graph ServerRouting::$log #### Class: ServerPlugin ServerPlugin::$config ServerPlugin::$serverContext #### Class: PluginBase PluginBase::$basePath PluginBase::$name PluginBase::$overriddenRequest | ### Inherited Methods #### 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 27] [ Top ] ### Class Methods ### method convertNodeIds [line 35]
`array convertNodeIds( array $stops)`
May convert stops identifiers sent by client to nodes identifiers useable by external routing module #### Tags:
access: | protected
#### Parameters:
array | $stops |
[ Top ] ### method drawRoutingResult [line 49]
`void drawRoutingResult( array $steps, array 1)`
May generate a list of shapes to draw path on map using plugin Outline #### Tags:
access: | protected
#### Parameters:
array | 1 | array of StyledShape
array | $steps | array of Step
[ Top ] ### method replacePlugin [line 80]
`void replacePlugin( )`
#### Tags:
access: | public
Overrides PluginBase::replacePlugin() (Returns name of parent plugin in case of plugin extension) [ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:07 +0200 by phpDocumentor 1.3.0RC3