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

Class: Cartoclient

Source Location: /client/Cartoclient.php

Class Overview


Main Cartoclient class


Variables

Constants

Methods



Class Details

[line 211]
Main Cartoclient class



[ Top ]


Class Variables

$cartoForm =

[line 241]



Tags:

access:  private

Type:   CartoForm


[ Top ]

$cartoserverService =

[line 261]



Tags:

access:  private

Type:   CartoserverService


[ Top ]

$clientSession =

[line 231]



Tags:

access:  private

Type:   ClientSession


[ Top ]

$config =

[line 271]



Tags:

access:  private

Type:   ClientConfig


[ Top ]

$formRenderer =

[line 256]



Tags:

access:  private

Type:   FormRenderer


[ Top ]

$httpRequestHandler =

[line 251]



Tags:

access:  private

Type:   HttpRequestHandler


[ Top ]

$initialMapState =

[line 326]



Tags:

access:  private

Type:   InitialMapState


[ Top ]

$interruptFlow =  false

[line 294]

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



Tags:

access:  private

Type:   boolean


[ Top ]

$isNewSession =

[line 321]



Tags:

access:  private

Type:   bool


[ Top ]

$log =

[line 216]



Tags:

access:  private

Type:   Logger


[ Top ]

$mapInfo =

[line 221]



Tags:

access:  private

Type:   MapInfo


[ Top ]

$mapInfoCache =

[line 226]



Tags:

access:  private

Type:   MapInfoCache


[ Top ]

$mapResult =

[line 246]



Tags:

access:  private

Type:   MapResult


[ Top ]

$messages = array()

[line 287]

Array of user/developer messages



Tags:

access:  private

Type:   array


[ Top ]

$outputType =

[line 316]



Tags:

access:  private

Type:   string


[ Top ]

$pluginManager =

[line 266]



Tags:

access:  private

Type:   PluginManager


[ Top ]

$projectHandler =

[line 276]



Tags:

access:  private



[ Top ]

$resourceHandler =

[line 281]



Tags:

access:  private

Type:   ResourceHandler


[ Top ]

$sessionName =

[line 236]



Tags:

access:  private

Type:   string


[ Top ]

$viewManager =

[line 299]



Tags:

access:  private

Type:   ViewManager


[ Top ]

$viewOn =  false

[line 305]

Indicates if a view is to be processed.



Tags:

access:  private

Type:   boolean


[ Top ]

$viewsEnable =

[line 311]

Indicates if views device is activated.



Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 351]

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

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

boolean areViewsEnable( )

Tells if views are enabled in configuration.



Tags:

access:  public


[ Top ]

method callPluginsImplementing [line 568]

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

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

string doExport( ExportPlugin $plugin)

Alternative processing of doMain() when exporting data.



Tags:

access:  private


Parameters:

ExportPlugin   $plugin  

[ Top ]

method doMain [line 834]

string doMain( )

Main method

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




Tags:

access:  private


[ Top ]

method getCartoForm [line 435]

CartoForm getCartoForm( )



Tags:

access:  public


[ Top ]

method getCartoserverService [line 477]

CartoserverService getCartoserverService( )



Tags:

access:  public


[ Top ]

method getClientSession [line 449]

ClientSession getClientSession( )



Tags:

access:  public


[ Top ]

method getConfig [line 407]

ClientConfig getConfig( )



Tags:

access:  public


[ Top ]

method getCorePluginNames [line 492]

array getCorePluginNames( )

Returns the names of core plugins



Tags:

return:  names
access:  private


[ Top ]

method getFormRenderer [line 470]

FormRenderer getFormRenderer( )



Tags:

return:  the current form renderer
access:  public


[ Top ]

method getHttpRequestHandler [line 456]

HttpRequestHandler getHttpRequestHandler( )



Tags:

access:  public


[ Top ]

method getInitialMapState [line 701]

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 getMapInfo [line 593]

MapInfo getMapInfo( )

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



Tags:

return:  MapInfo
access:  public
see:  MapInfoCache


[ Top ]

method getMapInfoCache [line 581]

MapInfoCache getMapInfoCache( )

Returns the MapInfoCache



Tags:

access:  private


[ Top ]

method getMapRequest [line 759]

MapRequest getMapRequest( )

Initializes map request with current mapId



Tags:

return:  new map request
access:  private


[ Top ]

method getMapResult [line 442]

MapResult getMapResult( )



Tags:

access:  public


[ Top ]

method getMapResultFromRequest [line 774]

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

array getMessages( )



Tags:

access:  public


[ Top ]

method getOutputType [line 540]

string getOutputType( )

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



Tags:

access:  public


[ Top ]

method getPluginManager [line 463]

PluginManager getPluginManager( )



Tags:

access:  public


[ Top ]

method getProjectHandler [line 417]

ProjectHandler getProjectHandler( )



Tags:

return:  the current cartoclient project handler
access:  public


[ Top ]

method getResourceHandler [line 424]

ResourceHandler getResourceHandler( )



Tags:

return:  the cartoclient resource handler
access:  public


[ Top ]

method getSelfUrl [line 805]

string getSelfUrl( )

Returns current base URL.



Tags:

access:  public


[ Top ]

method getSessionName [line 606]

string getSessionName( )

Builds and returns session name.



Tags:

access:  public


[ Top ]

method getValidExportType [line 998]

mixed getValidExportType( )

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



Tags:

access:  private


[ Top ]

method getViewManager [line 518]

ViewManager getViewManager( )



Tags:

access:  public


[ Top ]

method initializeObjects [line 975]

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

void initializePlugins( )

Initializes core and normal client plugins



Tags:

access:  private


[ Top ]

method initializeSession [line 667]

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 isInterruptFlow [line 797]

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

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

void manageViewsSystem( )

Detects if views controller must be launched.



Tags:

access:  private


[ Top ]

method saveSession [line 644]

void saveSession( ClientSession $clientSession)

Save session in a variable different for each mapId



Tags:

access:  private


Parameters:

ClientSession   $clientSession   object to save in session

[ Top ]

method setClientSession [line 484]

void setClientSession( ClientSession $clientSession)



Tags:

access:  public


Parameters:

ClientSession   $clientSession  

[ Top ]

method setInterruptFlow [line 788]

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 ]


Class Constants

CLIENT_SESSION_KEY =  'CW3_client_session_key'

[line 337]

Prefix for session key.


[ Top ]

OUTPUT_HTML_VIEWER =  'viewer'

[line 331]

Output formats constants.


[ Top ]

OUTPUT_IMAGE =  'image'

[line 332]


[ Top ]



Documentation generated on Mon, 13 Feb 2006 11:43:24 +0100 by phpDocumentor 1.3.0RC3