Client
[ class tree: Client ] [ index: Client ] [ all elements ]

Class: Cartoclient

Source Location: /client/Cartoclient.php

Class Overview

Cartocommon
   |
   --Cartoclient

Main Cartoclient class


Variables

Constants

Methods


Inherited Methods

Class: Cartocommon

Cartocommon::getCorePluginNames()
Returns the names of core plugins shared by client and server

Class Details

[line 214]
Main Cartoclient class



[ Top ]


Class Variables

$ajaxAction =  null

[line 348]

Current AJAX action, null if no AJAX action requested



Tags:

access:  private

Type:   string


[ Top ]

$cartoForm =

[line 244]



Tags:

access:  private

Type:   CartoForm


[ Top ]

$cartoserverService =

[line 264]



Tags:

access:  private

Type:   CartoserverService


[ Top ]

$clientSession =

[line 234]



Tags:

access:  private

Type:   ClientSession


[ Top ]

$config =

[line 274]



Tags:

access:  private

Type:   ClientConfig


[ Top ]

$formRenderer =

[line 259]



Tags:

access:  private

Type:   FormRenderer


[ Top ]

$httpRequestHandler =

[line 254]



Tags:

access:  private

Type:   HttpRequestHandler


[ Top ]

$initialMapState =

[line 336]



Tags:

access:  private

Type:   InitialMapState


[ Top ]

$instance =

[line 342]

Singleton



Tags:

static:  
access:  private

Type:   Cartoclient


[ Top ]

$interruptFlow =  false

[line 297]

When true, the cartoweb flow of operation will be interrupted and the html will be displayed.



Tags:

access:  private

Type:   boolean


[ Top ]

$isNewSession =

[line 324]



Tags:

access:  private

Type:   bool


[ Top ]

$log =

[line 219]



Tags:

access:  private

Type:   Logger


[ Top ]

$mapInfo =

[line 224]



Tags:

access:  private

Type:   MapInfo


[ Top ]

$mapInfoCache =

[line 229]



Tags:

access:  private

Type:   MapInfoCache


[ Top ]

$mapResult =

[line 249]



Tags:

access:  private

Type:   MapResult


[ Top ]

$messages = array()

[line 290]

Array of user/developer messages



Tags:

access:  private

Type:   array


[ Top ]

$outputType =

[line 319]



Tags:

access:  private

Type:   string


[ Top ]

$pluginManager =

[line 269]



Tags:

access:  private

Type:   PluginManager


[ Top ]

$preventSaveSession =

[line 331]

Boolean value allowing to bypass the saveSession() call, hence the

map state remain unmodified on next call




Tags:

access:  private

Type:   bool


[ Top ]

$projectHandler =

[line 279]



Tags:

access:  private



[ Top ]

$resourceHandler =

[line 284]



Tags:

access:  private

Type:   ResourceHandler


[ Top ]

$sessionName =

[line 239]



Tags:

access:  private

Type:   string


[ Top ]

$viewManager =

[line 302]



Tags:

access:  private

Type:   ViewManager


[ Top ]

$viewOn =  false

[line 308]

Indicates if a view is to be processed.



Tags:

access:  private

Type:   boolean


[ Top ]

$viewsEnable =

[line 314]

Indicates if views device is activated.



Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 378]

Cartoclient __construct( )

Constructor

Initializes:

  • Project handler
  • MapInfo cache
  • Client objects
  • Session
Plugins cannot call internationalization functions in constructor and in preInitialize().




Tags:

access:  public


[ Top ]

method addMessage [line 606]

void addMessage( string $message, [int $channel = Message::CHANNEL_USER])

Adds a message to the list of message to display to the user



Tags:

access:  public


Parameters:

string   $message   the text of the message
int   $channel   the channel identifier of the message

[ Top ]

method areViewsEnable [line 632]

boolean areViewsEnable( )

Tells if views are enabled in configuration.



Tags:

access:  public


[ Top ]

method callEnabledPluginImplementing [line 724]

void callEnabledPluginImplementing( int $enableLevel, string $pluginName, string $interface, string $functionName)

Calls a given $pluginName implementing an interface if its enable level is equal or higher than the given $enableLevel Interfaces are declared in ClientPlugin.



Tags:

access:  public


Parameters:

int   $enableLevel   minimum enable level for the plugin to be called
string   $pluginName   plugin name
string   $interface   interface name
string   $functionName   function name

[ Top ]

method callEnabledPluginsImplementing [line 705]

void callEnabledPluginsImplementing( int $enableLevel, string $interface, string $functionName)

Calls enabled plugins implementing an interface A plugin is enabled if its enable level is equal or higher than the given $enableLevel Interfaces are declared in ClientPlugin.



Tags:

access:  public


Parameters:

int   $enableLevel   minimum enable level for a plugin to be called
string   $interface   interface name
string   $functionName   function name

[ Top ]

method callPluginsImplementing [line 687]

void callPluginsImplementing( string $interface, string $functionName)

Calls plugins implementing an interface

Interfaces are declared in ClientPlugin.




Tags:

access:  public


Parameters:

string   $interface   interface name
string   $functionName   function name

[ Top ]

method clientAllowed [line 985]

void clientAllowed( )

Returns whether the current user has privileges to access cartoweb. It

reads the securityAllowedRoles variable in client.ini




Tags:

access:  public


[ Top ]

method doExport [line 1159]

string doExport( ExportPlugin $plugin)

Alternative processing of doMain() when exporting data.



Tags:

access:  private


Parameters:

ExportPlugin   $plugin  

[ Top ]

method doMain [line 1006]

string doMain( )

Main method

  • Plugins initialization
  • HTTP request handling
  • Map request construction
  • Server call
  • Result handling
  • Display
  • Session save




Tags:

access:  private


[ Top ]

method getAjaxAction [line 567]

string getAjaxAction( )

Returns the requested AJAX action



Tags:

return:  Requested AJAX action, or null if no AJAX action requested
access:  public


[ Top ]

method getCartoForm [line 480]

CartoForm getCartoForm( )



Tags:

access:  public


[ Top ]

method getCartoserverService [line 522]

CartoserverService getCartoserverService( )



Tags:

access:  public


[ Top ]

method getClientSession [line 494]

ClientSession getClientSession( )



Tags:

access:  public


[ Top ]

method getClientVersion [line 590]

array getClientVersion( )

Returns CartoWeb version and revision strings of the Cartoclient



Tags:

access:  public


[ Top ]

method getConfig [line 452]

ClientConfig getConfig( )



Tags:

access:  public


[ Top ]

method getCorePluginNames [line 582]

array getCorePluginNames( )

Returns the names of core plugins



Tags:

return:  names
access:  public


Overrides Cartocommon::getCorePluginNames() (Returns the names of core plugins shared by client and server)

[ Top ]

method getFormRenderer [line 515]

FormRenderer getFormRenderer( )



Tags:

return:  the current form renderer
access:  public


[ Top ]

method getHttpRequestHandler [line 501]

HttpRequestHandler getHttpRequestHandler( )



Tags:

access:  public


[ Top ]

method getInitialMapState [line 873]

InitialMapState getInitialMapState( )

Retrieves initialMapState data depending on detected initialMapStateId.

initialMapStateId is determined using (by order of priority): $_REQUEST, $_ENV, client.ini, auto (first initialMapState found).




Tags:

access:  public


[ Top ]

method getInstance [line 442]

Cartoclient getInstance( )

Returns the instance of this class. There is only one during the cartoclient lifetime.



Tags:

static:  
access:  public


[ Top ]

method getMapInfo [line 751]

MapInfo getMapInfo( )

Returns Map Info, get it from cache if not yet set



Tags:

return:  MapInfo
access:  public
see:  MapInfoCache


[ Top ]

method getMapInfoCache [line 739]

MapInfoCache getMapInfoCache( )

Returns the MapInfoCache



Tags:

access:  private


[ Top ]

method getMapRequest [line 931]

MapRequest getMapRequest( )

Initializes map request with current mapId



Tags:

return:  new map request
access:  private


[ Top ]

method getMapResult [line 487]

MapResult getMapResult( )



Tags:

access:  public


[ Top ]

method getMapResultFromRequest [line 946]

MapResult getMapResultFromRequest( MapRequest $mapRequest)

Calls Cartoserver service to get results

Also checks that MapInfo is up-to-date. If not, MapInfo cache reloads it.




Tags:

return:  result returned by server
access:  private
see:  MapInfoCache


Parameters:

MapRequest   $mapRequest   the map request

[ Top ]

method getMessages [line 614]

array getMessages( )



Tags:

access:  public


[ Top ]

method getOutputType [line 643]

string getOutputType( )

Returns the current output type (pdf, csv, html, etc.).



Tags:

access:  public


[ Top ]

method getPluginManager [line 508]

PluginManager getPluginManager( )



Tags:

access:  public


[ Top ]

method getProjectHandler [line 462]

ProjectHandler getProjectHandler( )



Tags:

return:  the current cartoclient project handler
access:  public


[ Top ]

method getResourceHandler [line 469]

ResourceHandler getResourceHandler( )



Tags:

return:  the cartoclient resource handler
access:  public


[ Top ]

method getSelfUrl [line 977]

string getSelfUrl( )

Returns current base URL.



Tags:

access:  public


[ Top ]

method getSessionName [line 768]

string getSessionName( )

Builds and returns session name.



Tags:

access:  public


[ Top ]

method getValidExportType [line 1228]

mixed getValidExportType( )

Tells if an export plugin is available for current output and returns it.



Tags:

access:  private


[ Top ]

method getViewManager [line 621]

ViewManager getViewManager( )



Tags:

access:  public


[ Top ]

method initializeObjects [line 1205]

void initializeObjects( )

Initializes client objects

Initializes:

  • Configuration
  • I18n
  • UTF/ISO Encoding
  • Plugins
  • Cartoserver service
  • HTTP request handler
  • Form renderer




Tags:

access:  private


[ Top ]

method initializePlugins [line 666]

void initializePlugins( )

Initializes core and normal client plugins



Tags:

access:  private


[ Top ]

method initializeSession [line 839]

void initializeSession( )

Initializes session

If the mapId's session is not created yet, it is created and initialized. For creation and reload, plugins are called to manage their session data.




Tags:

access:  private
see:  Sessionable


[ Top ]

method isAjaxMode [line 531]

bool isAjaxMode( )

Tells if the Cartoclient runs in AJAX mode



Tags:

return:  true if the Cartoclient runs in AJAX mode, false otherwise
access:  public


[ Top ]

method isInterruptFlow [line 969]

void isInterruptFlow( )

Returns true if the flow of operation has to be interrupted, and the template displayed without calling server.



Tags:

access:  public
see:  #setInterruptFlow()


[ Top ]

method main [line 1246]

string main( )

Main entry point.

Calls Cartoclient::doMain() or Cartoclient::doExport() with exception handling.




Tags:

return:  CartoWeb page string
access:  public


[ Top ]

method manageViewsSystem [line 1178]

void manageViewsSystem( )

Detects if views controller must be launched.



Tags:

access:  private


[ Top ]

method prepareAjax [line 1125]

void prepareAjax( string $ajaxAction)

Prepares the AJAX mode by setting plugins enable level according the given ajaxAction.



Tags:

access:  private


Parameters:

string   $ajaxAction   AJAX action

[ Top ]

method saveSession [line 805]

void saveSession( )

Saves session data in a different container for each mapId



Tags:

access:  public


[ Top ]

method setAjaxAction [line 539]

string setAjaxAction( mixed $ajaxAction)

Sets the current AJAX action



Tags:

return:  Requested AJAX action, or null if no AJAX action requested
access:  public


[ Top ]

method setClientSession [line 574]

void setClientSession( ClientSession $clientSession)



Tags:

access:  public


Parameters:

ClientSession   $clientSession  

[ Top ]

method setInterruptFlow [line 960]

void setInterruptFlow( boolean $interruptFlow)

Tells the Cartoclient that the normal control flow has to be interrupted.

When true, the server will not be called, and the final template drawing step is invoked.




Tags:

access:  public


Parameters:

boolean   $interruptFlow   true if the control flow has to be interrupted.

[ Top ]

method setOutputType [line 651]

void setOutputType( string $outputType)

Set the current output type (pdf, csv, html, etc.).



Tags:

access:  public


Parameters:

string   $outputType   one of the predefined output type

[ Top ]

method setPreventSaveSession [line 659]

void setPreventSaveSession( bool $preventSaveSession)

Activate session bypass



Tags:

access:  public


Parameters:

bool   $preventSaveSession   preventSaveSession session bypassed if true

[ Top ]


Class Constants

AJAXACTION_PARAM_NAME =  'ajaxActionRequest'

[line 353]

HTTP parameter name for AJAX actions


[ Top ]

CLIENT_SESSION_KEY =  'CW3_client_session_key'

[line 364]

Prefix for session key.


[ Top ]

OUTPUT_HTML_VIEWER =  'viewer'

[line 358]

Output formats constants.


[ Top ]

OUTPUT_IMAGE =  'image'

[line 359]


[ Top ]



Documentation generated on Fri, 21 Sep 2007 13:30:31 +0200 by phpDocumentor 1.3.0RC3