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 215]
Main Cartoclient class



[ Top ]


Class Variables

$ajaxAction =  null

[line 349]

Current AJAX action, null if no AJAX action requested



Tags:

access:  private

Type:   string


[ Top ]

$cartoForm =

[line 245]



Tags:

access:  private

Type:   CartoForm


[ Top ]

$cartoserverService =

[line 265]



Tags:

access:  private

Type:   CartoserverService


[ Top ]

$clientSession =

[line 235]



Tags:

access:  private

Type:   ClientSession


[ Top ]

$config =

[line 275]



Tags:

access:  private

Type:   ClientConfig


[ Top ]

$forceMapRefresh =

[line 354]



Tags:

var:  forceMapRefresh
access:  private

Type:   bool


[ Top ]

$formRenderer =

[line 260]



Tags:

access:  private

Type:   FormRenderer


[ Top ]

$httpRequestHandler =

[line 255]



Tags:

access:  private

Type:   HttpRequestHandler


[ Top ]

$initialMapState =

[line 337]



Tags:

access:  private

Type:   InitialMapState


[ Top ]

$instance =

[line 343]

Singleton



Tags:

static:  
access:  private

Type:   Cartoclient


[ Top ]

$interruptFlow =  false

[line 298]

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



Tags:

access:  private

Type:   boolean


[ Top ]

$isNewSession =

[line 325]



Tags:

access:  private

Type:   bool


[ Top ]

$log =

[line 220]



Tags:

access:  private

Type:   Logger


[ Top ]

$mapInfo =

[line 225]



Tags:

access:  private

Type:   MapInfo


[ Top ]

$mapInfoCache =

[line 230]



Tags:

access:  private

Type:   MapInfoCache


[ Top ]

$mapResult =

[line 250]



Tags:

access:  private

Type:   MapResult


[ Top ]

$messages = array()

[line 291]

Array of user/developer messages



Tags:

access:  private

Type:   array


[ Top ]

$outputType =

[line 320]



Tags:

access:  private

Type:   string


[ Top ]

$pluginManager =

[line 270]



Tags:

access:  private

Type:   PluginManager


[ Top ]

$preventSaveSession =

[line 332]

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 280]



Tags:

access:  private



[ Top ]

$resourceHandler =

[line 285]



Tags:

access:  private

Type:   ResourceHandler


[ Top ]

$sessionName =

[line 240]



Tags:

access:  private

Type:   string


[ Top ]

$viewManager =

[line 303]



Tags:

access:  private

Type:   ViewManager


[ Top ]

$viewOn =  false

[line 309]

Indicates if a view is to be processed.



Tags:

access:  private

Type:   boolean


[ Top ]

$viewsEnable =

[line 315]

Indicates if views device is activated.



Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


method addMessage [line 620]

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 646]

boolean areViewsEnable( )

Tells if views are enabled in configuration.



Tags:

access:  public


[ Top ]

method callEnabledPluginImplementing [line 757]

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 738]

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 720]

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 1018]

void clientAllowed( )

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

reads the securityAllowedRoles variable in client.ini




Tags:

access:  public


[ Top ]

constructor __construct [line 384]

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 doExport [line 1208]

string doExport( ExportPlugin $plugin)

Alternative processing of doMain() when exporting data.



Tags:

access:  private


Parameters:

ExportPlugin   $plugin  

[ Top ]

method doMain [line 1039]

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 581]

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 494]

CartoForm getCartoForm( )



Tags:

access:  public


[ Top ]

method getCartoserverService [line 536]

CartoserverService getCartoserverService( )



Tags:

access:  public


[ Top ]

method getClientSession [line 508]

ClientSession getClientSession( )



Tags:

access:  public


[ Top ]

method getClientVersion [line 604]

array getClientVersion( )

Returns CartoWeb version and revision strings of the Cartoclient



Tags:

access:  public


[ Top ]

method getConfig [line 466]

ClientConfig getConfig( )



Tags:

access:  public


[ Top ]

method getCorePluginNames [line 596]

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 529]

FormRenderer getFormRenderer( )



Tags:

return:  the current form renderer
access:  public


[ Top ]

method getHttpRequestHandler [line 515]

HttpRequestHandler getHttpRequestHandler( )



Tags:

access:  public


[ Top ]

method getInitialMapState [line 906]

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 456]

Cartoclient getInstance( )

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



Tags:

static:  
access:  public


[ Top ]

method getMapInfo [line 784]

MapInfo getMapInfo( )

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



Tags:

return:  MapInfo
access:  public
see:  MapInfoCache


[ Top ]

method getMapInfoCache [line 772]

MapInfoCache getMapInfoCache( )

Returns the MapInfoCache



Tags:

access:  private


[ Top ]

method getMapRequest [line 964]

MapRequest getMapRequest( )

Initializes map request with current mapId



Tags:

return:  new map request
access:  private


[ Top ]

method getMapResult [line 501]

MapResult getMapResult( )



Tags:

access:  public


[ Top ]

method getMapResultFromRequest [line 979]

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 628]

array getMessages( )



Tags:

access:  public


[ Top ]

method getOutputType [line 657]

string getOutputType( )

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



Tags:

access:  public


[ Top ]

method getPluginManager [line 522]

PluginManager getPluginManager( )



Tags:

access:  public


[ Top ]

method getProjectHandler [line 476]

ProjectHandler getProjectHandler( )



Tags:

return:  the current cartoclient project handler
access:  public


[ Top ]

method getResourceHandler [line 483]

ResourceHandler getResourceHandler( )



Tags:

return:  the cartoclient resource handler
access:  public


[ Top ]

method getSelfUrl [line 1010]

string getSelfUrl( )

Returns current base URL.



Tags:

access:  public


[ Top ]

method getSessionName [line 801]

string getSessionName( )

Builds and returns session name.



Tags:

access:  public


[ Top ]

method getValidExportType [line 1282]

mixed getValidExportType( )

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



Tags:

access:  private


[ Top ]

method getViewManager [line 635]

ViewManager getViewManager( )



Tags:

access:  public


[ Top ]

method initializeObjects [line 1254]

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 699]

void initializePlugins( )

Initializes core and normal client plugins



Tags:

access:  private


[ Top ]

method initializeSession [line 872]

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 545]

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 1002]

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 1300]

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 1227]

void manageViewsSystem( )

Detects if views controller must be launched.



Tags:

access:  private


[ Top ]

method prepareAjax [line 1174]

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 838]

void saveSession( )

Saves session data in a different container for each mapId



Tags:

access:  public


[ Top ]

method setAjaxAction [line 553]

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 setCacheOverride [line 689]

object setCacheOverride( object $mapRequest)

Activate map cache bypass



Tags:

access:  private


Parameters:

object   $mapRequest  

[ Top ]

method setClientSession [line 588]

void setClientSession( ClientSession $clientSession)



Tags:

access:  public


Parameters:

ClientSession   $clientSession  

[ Top ]

method setForceMapRefresh [line 680]

void setForceMapRefresh( )

Set map cache bypass local var, can be called by plugins



Tags:

access:  public


[ Top ]

method setInterruptFlow [line 993]

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 665]

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 673]

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 359]

HTTP parameter name for AJAX actions


[ Top ]

CLIENT_SESSION_KEY =  'CW3_client_session_key'

[line 370]

Prefix for session key.


[ Top ]

OUTPUT_HTML_VIEWER =  'viewer'

[line 364]

Output formats constants.


[ Top ]

OUTPUT_IMAGE =  'image'

[line 365]


[ Top ]



Documentation generated on Thu, 04 Sep 2008 11:39:08 +0200 by phpDocumentor 1.3.0RC3