Plugins

# Class: ServerEdit Source Location: /plugins/edit/server/ServerEdit.php
### Class Overview
    PluginBase
       |
       --ServerPlugin
          |
          --ClientResponderAdapter
             |
             --ServerEdit
Server Edit class | ### Variables $attributes $db $idAttribute $log | ### Methods __construct checkLayerMetadata deleteFeature getAttributes getDb getDsn getEditableAttributes getGeomColumn getGeometryType getMetadataValueString getSrid handleDrawing handlePreDrawing insertFeature pointToBox3D selectFeaturesById selectFeaturesByShape updateFeature
### Inherited Variables #### Class: ServerPlugin ServerPlugin::$config ServerPlugin::$serverContext #### Class: PluginBase PluginBase::$basePath PluginBase::$name PluginBase::$overriddenRequest | ### Inherited Methods #### 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 34] Server Edit class [ Top ] ### Class Variables #### $attributes = [line 57] List of attributes #### Tags:
access: | protected
Type: | array
[ Top ] #### $db = [line 45] Database object #### Tags:
access: | protected
Type: | DB
[ Top ] #### $idAttribute = [line 51] Id attribute #### Tags:
access: | protected
Type: | string
[ Top ] #### $log = [line 39] #### Tags:
access: | protected
Type: | Logger
Overrides: | Array
[ Top ] ### Class Methods ### constructor __construct [line 62]
`ServerEdit __construct( )`
Constructor #### Tags:
access: | public
Overrides ServerPlugin::__construct() (Constructor) [ Top ] ### method checkLayerMetadata [line 547]
`boolean checkLayerMetadata( )`
Checks if layer metadata are valid. #### Tags:
access: | protected
[ Top ] ### method deleteFeature [line 335]
`queryId deleteFeature( id $feature)`
Handles shapes deletion #### Tags:
access: | protected
#### Parameters:
id | $feature | id of the object to update
[ Top ] ### method getAttributes [line 130]
`array getAttributes( string $layerId)`
Returns list of attributes to be returned #### Tags:
access: | protected
#### Parameters:
string | $layerId | layer id
[ Top ] ### method getDb [line 72]
`DB getDb( mixed $layerId)`
Returns the Pear::DB database connection. #### Tags:
access: | protected
[ Top ] ### method getDsn [line 170]
`string getDsn( string $layerId)`
Converts the mapfile connection to acceptable DSN #### Tags:
return: | dsn
access: | protected
#### Parameters:
string | $layerId | layer id
[ Top ] ### method getEditableAttributes [line 115]
`void getEditableAttributes( mixed $attributes)`
Gets the "edit_attributes" string from a list of attributes and from metadata #### Tags:
var: | layer id
access: | protected
[ Top ] ### method getGeomColumn [line 209]
`string getGeomColumn( )`
Gets the geometry column from metadata #### Tags:
return: | geometry column
access: | protected
[ Top ] ### method getGeometryType [line 224]
`string getGeometryType( )`
Gets the geometry column from metadata #### Tags:
return: | geometry column
access: | protected
[ Top ] ### method getMetadataValueString [line 93]
`void getMetadataValueString( mixed $layerId, mixed $metadataName)`
metadata string value #### Tags:
access: | protected
[ Top ] ### method getSrid [line 200]
`integer getSrid( )`
Gets the srid from metadata #### Tags:
return: | srid
access: | protected
[ Top ] ### method handleDrawing [line 623]
`EditResult handleDrawing( EditRequest $requ)`
Handles shapes drawing #### Tags:
access: | public
Overrides ClientResponderAdapter::handleDrawing() (parent method not documented) #### Parameters:
EditRequest | $requ |
[ Top ] ### method handlePreDrawing [line 578]
`EditResult handlePreDrawing( EditRequest $requ)`
Handles shapes insert in the database #### Tags:
access: | public
Overrides ClientResponderAdapter::handlePreDrawing() (parent method not documented) #### Parameters:
EditRequest | $requ |
[ Top ] ### method insertFeature [line 243]
`queryId insertFeature( array $feature)`
Handles shapes input #### Tags:
access: | protected
#### Parameters:
array | $feature | array of shapes
[ Top ] ### method pointToBox3D [line 361]
`box3D pointToBox3D( Dimension $x, x $y, y $width, Bbox $height, Bbox $bbox, [mixed $tolerance = 3])`
converts a geographical point to a Box3D using tolerance #### Tags:
access: | protected
#### Parameters:
Dimension | $x | image size
x | $y | geo coordinate
y | $width | geo coordinate
Bbox | $height | current bbox in geographical coordinates
tolerance | $bbox | tolerance given in pixel
[ Top ] ### method selectFeaturesById [line 499]
`array selectFeaturesById( string $featuresIds)`
Select shapes with given id's from database #### Tags:
return: | array of features
access: | protected
#### Parameters:
string | $featuresIds | list of ids
[ Top ] ### method selectFeaturesByShape [line 379]
`void selectFeaturesByShape( array $shapes)`
Handles shapes input #### Tags:
access: | protected
#### Parameters:
array | $shapes | array of shapes
[ Top ] ### method updateFeature [line 292]
`queryId updateFeature( id $feature, array 1)`
Handles shapes update #### Tags:
access: | protected
#### Parameters:
array | 1 | array of shapes
id | $feature | id of the object to update
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:31:02 +0200 by phpDocumentor 1.3.0RC3