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



[ Top ]


Class Variables

$cartoForm =

[line 240]



Tags:

access:  private

Type:   CartoForm


[ Top ]

$cartoserverService =

[line 260]



Tags:

access:  private

Type:   CartoserverService


[ Top ]

$clientSession =

[line 230]



Tags:

access:  private

Type:   ClientSession


[ Top ]

$config =

[line 270]



Tags:

access:  private

Type:   ClientConfig


[ Top ]

$formRenderer =

[line 255]



Tags:

access:  private

Type:   FormRenderer


[ Top ]

$httpRequestHandler =

[line 250]



Tags:

access:  private

Type:   HttpRequestHandler


[ Top ]

$interruptFlow =  false

[line 293]

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



Tags:

access:  private

Type:   boolean


[ Top ]

$isNewSession =

[line 320]



Tags:

access:  private

Type:   bool


[ Top ]

$log =

[line 215]



Tags:

access:  private

Type:   Logger


[ Top ]

$mapInfo =

[line 220]



Tags:

access:  private

Type:   MapInfo


[ Top ]

$mapInfoCache =

[line 225]



Tags:

access:  private

Type:   MapInfoCache


[ Top ]

$mapResult =

[line 245]



Tags:

access:  private

Type:   MapResult


[ Top ]

$messages = array()

[line 286]

Array of user/developer messages



Tags:

access:  private

Type:   array


[ Top ]

$outputType =

[line 315]



Tags:

access:  private

Type:   string


[ Top ]

$pluginManager =

[line 265]



Tags:

access:  private

Type:   PluginManager


[ Top ]

$projectHandler =

[line 275]



Tags:

access:  private



[ Top ]

$resourceHandler =

[line 280]



Tags:

access:  private

Type:   ResourceHandler


[ Top ]

$sessionName =

[line 235]



Tags:

access:  private

Type:   string


[ Top ]

$viewManager =

[line 298]



Tags:

access:  private

Type:   ViewManager


[ Top ]

$viewOn =  false

[line 304]

Indicates if a view is to be processed.



Tags:

access:  private

Type:   boolean


[ Top ]

$viewsEnable =

[line 310]

Indicates if views device is activated.



Tags:

access:  private

Type:   boolean


[ Top ]



Class Methods


constructor __construct [line 345]

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

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

boolean areViewsEnable( )

Tells if views are enabled in configuration.



Tags:

access:  public


[ Top ]

method callPluginsImplementing [line 562]

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

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

string doExport( ExportPlugin $plugin)

Alternative processing of doMain() when exporting data.



Tags:

access:  private


Parameters:

ExportPlugin   $plugin  

[ Top ]

method doMain [line 821]

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

CartoForm getCartoForm( )



Tags:

access:  public


[ Top ]

method getCartoserverService [line 471]

CartoserverService getCartoserverService( )



Tags:

access:  public


[ Top ]

method getClientSession [line 443]

ClientSession getClientSession( )



Tags:

access:  public


[ Top ]

method getConfig [line 401]

ClientConfig getConfig( )



Tags:

access:  public


[ Top ]

method getCorePluginNames [line 486]

array getCorePluginNames( )

Returns the names of core plugins



Tags:

return:  names
access:  private


[ Top ]

method getFormRenderer [line 464]

FormRenderer getFormRenderer( )



Tags:

return:  the current form renderer
access:  public


[ Top ]

method getHttpRequestHandler [line 450]

HttpRequestHandler getHttpRequestHandler( )



Tags:

access:  public


[ Top ]

method getInitialMapState [line 691]

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:  private


[ Top ]

method getMapInfo [line 587]

MapInfo getMapInfo( )

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



Tags:

return:  MapInfo
access:  public
see:  MapInfoCache


[ Top ]

method getMapInfoCache [line 575]

MapInfoCache getMapInfoCache( )

Returns the MapInfoCache



Tags:

access:  private


[ Top ]

method getMapRequest [line 746]

MapRequest getMapRequest( )

Initializes map request with current mapId



Tags:

return:  new map request
access:  private


[ Top ]

method getMapResult [line 436]

MapResult getMapResult( )



Tags:

access:  public


[ Top ]

method getMapResultFromRequest [line 761]

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

array getMessages( )



Tags:

access:  public


[ Top ]

method getOutputType [line 534]

string getOutputType( )

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



Tags:

access:  public


[ Top ]

method getPluginManager [line 457]

PluginManager getPluginManager( )



Tags:

access:  public


[ Top ]

method getProjectHandler [line 411]

ProjectHandler getProjectHandler( )



Tags:

return:  the current cartoclient project handler
access:  public


[ Top ]

method getResourceHandler [line 418]

ResourceHandler getResourceHandler( )



Tags:

return:  the cartoclient resource handler
access:  public


[ Top ]

method getSelfUrl [line 792]

string getSelfUrl( )

Returns current base URL.



Tags:

access:  public


[ Top ]

method getSessionName [line 600]

string getSessionName( )

Builds and returns session name.



Tags:

access:  private


[ Top ]

method getValidExportType [line 982]

mixed getValidExportType( )

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



Tags:

access:  private


[ Top ]

method getViewManager [line 512]

ViewManager getViewManager( )



Tags:

access:  public


[ Top ]

method initializeObjects [line 959]

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

void initializePlugins( )

Initializes core and normal client plugins



Tags:

access:  private


[ Top ]

method initializeSession [line 657]

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

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

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

void manageViewsSystem( )

Detects if views controller must be launched.



Tags:

access:  private


[ Top ]

method saveSession [line 634]

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

void setClientSession( ClientSession $clientSession)



Tags:

access:  public


Parameters:

ClientSession   $clientSession  

[ Top ]

method setInterruptFlow [line 775]

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

Prefix for session key.


[ Top ]

OUTPUT_HTML_VIEWER =  'viewer'

[line 325]

Output formats constants.


[ Top ]

OUTPUT_IMAGE =  'image'

[line 326]


[ Top ]



Documentation generated on Fri, 11 Nov 2005 10:59:41 +0000 by phpDocumentor 1.3.0RC3