CorePlugins

# Class: ClientImages Source Location: /coreplugins/images/client/ClientImages.php
### Class Overview
    PluginBase
       |
       --ClientPlugin
          |
          --ClientImages
Client part of Images plugin | ### Variables $collapseKeymap $drawKeymap $drawMainmap $drawScalebar $imagesResult $imagesState $log $mapSizes | ### Constants DEF_MAP_HEIGHT DEF_MAP_WIDTH DEF_MAX_MAP_HEIGHT DEF_MAX_MAP_WIDTH | ### Methods adjustExportMapRequest ajaxGetPluginResponse ajaxHandleAction buildRequest checkMapDimensions createSession __construct detectIfImageDrawn drawMapSizes getImagesResult getImageUrl getMainmapDimensions getMapSizes handleHttpGetRequest handleHttpPostRequest handleHttpRequest handleMapSize handleResult initializeResult initMapSizes loadSession outputMap renderForm renderFormPrepare saveSession setMapDimensions
### Inherited Constants #### Class: ClientPlugin ClientPlugin::ENABLE_LEVEL_FULL ClientPlugin::ENABLE_LEVEL_LOAD ClientPlugin::ENABLE_LEVEL_PROCESS ClientPlugin::ENABLE_LEVEL_SERVERCALL | ### Inherited Variables #### Class: ClientPlugin ClientPlugin::$cartoclient ClientPlugin::$config ClientPlugin::$enabledLevel #### Class: PluginBase PluginBase::$basePath PluginBase::$name PluginBase::$overriddenRequest | ### Inherited Methods #### Class: ClientPlugin ClientPlugin::__construct() Constructor ClientPlugin::checkBool() Checks if variable $variable has a boolean (0 or 1) value $value. ClientPlugin::checkInt() Checks if variable $variable has an integer positive or zero value $value. ClientPlugin::checkNumeric() Checks if variable $variable has a numeric value $value. ClientPlugin::disable() Sets the enable level to ClientPlugin::ENABLE_LEVEL_SERVERCALL. ClientPlugin::enable() Sets the enable level to ClientPlugin::ENABLE_LEVEL_FULL. ClientPlugin::getCartoclient() ClientPlugin::getConfig() ClientPlugin::getEnabledLevel() Returns the enable level. ClientPlugin::getHttpValue() Returns the user-submitted $key data if it is set. ClientPlugin::initializeConfig() Initializes plugin configuration ClientPlugin::isEnabledAtLevel() Sets the enable level to ClientPlugin::ENABLE_LEVEL_FULL. ClientPlugin::setEnableLevel() Sets the enable level (to be used with the AJAX mode). #### 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 52] Client part of Images plugin [ Top ] ### Class Variables #### $collapseKeymap = 0 [line 82] Indicates if keymap must be collapsible #### Tags:
access: | protected
Type: | boolean
[ Top ] #### $drawKeymap = [line 94] Indicates if keymap must be drawn. #### Tags:
access: | protected
Type: | boolean
[ Top ] #### $drawMainmap = [line 100] Indicates if mainmap must be drawn. #### Tags:
access: | protected
Type: | boolean
[ Top ] #### $drawScalebar = [line 88] Indicates if scalebar must be drawn. #### Tags:
access: | protected
Type: | boolean
[ Top ] #### $imagesResult = [line 70] Last server result #### Tags:
access: | protected
Type: | ImagesResult
[ Top ] #### $imagesState = [line 64] Current session state #### Tags:
access: | protected
Type: | ImagesState
[ Top ] #### $log = [line 58] #### Tags:
access: | private
Type: | Logger
Overrides: | Array
[ Top ] #### $mapSizes = [line 76] Possible map sizes #### Tags:
access: | protected
Type: | array
[ Top ] ### Class Methods ### method adjustExportMapRequest [line 561]
`void adjustExportMapRequest( ExportConfiguration $configuration, MapRequest $mapRequest)`
#### Tags:
access: | public
see: | Exportable::adjustExportMapRequest()
[ Top ] ### method ajaxGetPluginResponse [line 530]
`void ajaxGetPluginResponse( AjaxPluginResponse $ajaxPluginResponse)`
#### Tags:
access: | public
see: | Ajaxable::ajaxGetPluginResponse() FIXME: when all the values in the $assignArray are to be assigned, 1354
[ Top ] ### method ajaxHandleAction [line 540]
`void ajaxHandleAction( mixed $actionName, PluginEnabler $pluginEnabler)`
#### Tags:
access: | public
see: | Ajaxable::ajaxHandleAction()
[ Top ] ### method buildRequest [line 350]
`void buildRequest( )`
#### Tags:
access: | public
see: | ServerCaller::buildRequest()
[ Top ] ### method checkMapDimensions [line 214]
`boolean checkMapDimensions( mixed $width, mixed $height)`
Checks if required map width and height are allowed. #### Tags:
access: | protected
#### Parameters:
mixed | $width | width
mixed | $height | height
[ Top ] ### method createSession [line 142]
`void createSession( MapInfo $mapInfo, InitialMapState $initialMapState)`
#### Tags:
access: | public
see: | Sessionable::createSession()
[ Top ] ### constructor __construct [line 127]
`ClientImages __construct( )`
Constructor #### Tags:
access: | public
Overrides ClientPlugin::__construct() (Constructor) [ Top ] ### method detectIfImageDrawn [line 281]
`void detectIfImageDrawn( string $image, array &$request)`
Tries to decide if the mainmap (resp. scalebar, keymap) must be drawn or not. #### Tags:
access: | protected
#### Parameters:
string | $image | image name
array | &$request | request data
[ Top ] ### method drawMapSizes [line 451]
`string drawMapSizes( )`
Draws map sizes choice #### Tags:
return: | Smarty generated HTML content
access: | protected
[ Top ] ### method getImagesResult [line 159]
`ImagesResult getImagesResult( )`
Returns the last server result #### Tags:
access: | public
[ Top ] ### method getImageUrl [line 413]
`string getImageUrl( string $path, [boolean $useXhtml = true], [mixed $forceAbsolute = false])`
#### Tags:
return: | The URL to the image, as put inside the html template
access: | protected
#### Parameters:
string | $path | minimal image path
boolean | $useXhtml | True to make URL XHTML-compliant
[ Top ] ### method getMainmapDimensions [line 300]
`Dimension getMainmapDimensions( )`
Returns the dimensions of the main map. It may be used by other plugins. #### Tags:
access: | public
[ Top ] ### method getMapSizes [line 308]
`array getMapSizes( )`
Returns the list of map sizes to display. #### Tags:
return: | Array of map sizes (Map with label, with and height keys)
access: | public
[ Top ] ### method handleHttpGetRequest [line 255]
`void handleHttpGetRequest( mixed $request)`
#### Tags:
access: | public
see: | GuiProvider::handleHttpPostRequest()
[ Top ] ### method handleHttpPostRequest [line 244]
`void handleHttpPostRequest( mixed $request)`
#### Tags:
access: | public
see: | GuiProvider::handleHttpPostRequest()
[ Top ] ### method handleHttpRequest [line 264]
`void handleHttpRequest( mixed $request)`
Common part of self::handleHttpPostRequest() and self::handleHttpGetRequest() #### Tags:
access: | protected
[ Top ] ### method handleMapSize [line 168]
`void handleMapSize( array $request, [boolean $check = false])`
Handles map sizes dropdown box #### Tags:
access: | protected
#### Parameters:
array | $request | HTTP request
boolean | $check | checks?
[ Top ] ### method handleResult [line 406]
`void handleResult( mixed $imagesResult)`
#### Tags:
access: | public
see: | ServerCaller::handleResult()
[ Top ] ### method initializeResult [line 395]
`void initializeResult( mixed $imagesResult)`
#### Tags:
access: | public
see: | ServerCaller::initializeResult()
[ Top ] ### method initMapSizes [line 424]
`array initMapSizes( )`
Reads map sizes from configuration #### Tags:
return: | Array of map sizes (Map with label, with and height keys)
access: | protected
[ Top ] ### method loadSession [line 134]
`void loadSession( mixed $sessionObject)`
#### Tags:
access: | public
see: | Sessionable::loadSession()
[ Top ] ### method outputMap [line 592]
`void outputMap( )`
Outputs raw mainmap image. #### Tags:
access: | public
[ Top ] ### method renderForm [line 518]
`void renderForm( Smarty $template)`
#### Tags:
access: | public
see: | GuiProvider::renderForm() FIXME: when all the values in the $assignArray are to be assigned, 1354
[ Top ] ### method renderFormPrepare [line 472]
`array renderFormPrepare( )`
This method factors the plugin output for both GuiProvider::renderForm() and Ajaxable::ajaxGetPluginResponse(). #### Tags:
return: | array of variables and html code to be assigned
access: | protected
[ Top ] ### method saveSession [line 553]
`void saveSession( )`
#### Tags:
access: | public
see: | Sessionable::saveSession()
[ Top ] ### method setMapDimensions [line 326]
`void setMapDimensions( int &$mapWidth, int &$mapHeight)`
Sets map width and height Sets from: Selected size from predefined list, if config's mapSizesActive = true Fixed size from config file Default size #### Tags:
access: | protected
#### Parameters:
int | &$mapWidth | width to be set
int | &$mapHeight | height to be set
[ Top ] ### Class Constants #### DEF_MAP_HEIGHT = 200 [line 110] Default map height, if not specified in config [ Top ] #### DEF_MAP_WIDTH = 400 [line 105] Default map width, if not specified in config [ Top ] #### DEF_MAX_MAP_HEIGHT = 1000 [line 122] Default max map height, if not specified in config. Test is performed only when using $_REQUEST customMapsize. [ Top ] #### DEF_MAX_MAP_WIDTH = 1500 [line 116] Default max map width, if not specified in config. Test is performed only when using $_REQUEST customMapsize. [ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:37 +0200 by phpDocumentor 1.3.0RC3