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

Class: ClientExportPdf

Source Location: /plugins/exportPdf/client/ClientExportPdf.php

Class Overview

PluginBase
   |
   --ClientPlugin
      |
      --ExportPlugin
         |
         --ClientExportPdf

Overall class for PDF generation management.


Variables

Methods


Inherited Variables

Inherited Methods

Class: ExportPlugin

ExportPlugin::getExport()
Renders export
ExportPlugin::getExportResult()
Retrieves MapResult
ExportPlugin::getExportScriptPath()
Returns export script path. This assumes the script is called export.php in the htdocs directory of the plugin. Clients should override this if this is not the case.
ExportPlugin::getLastMapRequest()
Returns session-saved last MapRequest.
ExportPlugin::getLastMapResult()
Returns session-saved last MapResult.

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::getCartoclient()
ClientPlugin::getConfig()
ClientPlugin::getHttpValue()
Returns the user-submitted $key data if it is set.
ClientPlugin::initializeConfig()
Initializes plugin configuration

Class: PluginBase

PluginBase::__construct()
Constructor
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::replacePlugin()
Returns name of parent plugin in case of plugin extension
PluginBase::setBasePath()
PluginBase::setExtendedName()
PluginBase::setName()

Class Details

[line 32]
Overall class for PDF generation management.



[ Top ]


Class Variables

$blocks = array()

[line 63]



Tags:

access:  private

Type:   array


[ Top ]

$blockTemplate =

[line 58]



Tags:

access:  private

Type:   PdfBlock


[ Top ]

$charset =

[line 85]



Tags:

access:  private

Type:   string


[ Top ]

$format =

[line 53]



Tags:

access:  private

Type:   PdfFormat


[ Top ]

$general =

[line 48]



Tags:

access:  private

Type:   PdfGeneral


[ Top ]

$log =

[line 38]



Tags:

access:  private

Type:   Logger
Overrides:   Array


[ Top ]

$mapScale =

[line 75]



Tags:

access:  private

Type:   float


[ Top ]

$mapServerResolution =

[line 80]



Tags:

access:  private

Type:   int


[ Top ]

$optionalInputs = array('title', 'note', 'scalebar', 'overview',
                                    'queryResult', 'legend')

[line 68]



Tags:

access:  private

Type:   array


[ Top ]

$smarty =

[line 43]



Tags:

access:  private

Type:   Smarty_CorePlugin


[ Top ]



Class Methods


constructor __construct [line 90]

ClientExportPdf __construct( )

Constructor



Tags:

access:  public


Overrides ClientPlugin::__construct() (Constructor)

[ Top ]

method addBlock [line 888]

void addBlock( PdfWriter $pdf, PdfBlock $block)

Draws given block.



Tags:

access:  private


Parameters:

PdfWriter   $pdf  
PdfBlock   $block  

[ Top ]

method createBlock [line 234]

void createBlock( array $request, stdClass $iniObjects, string $id)

Instanciates a PdfBlock object.



Tags:

access:  private


Parameters:

array   $request  
stdClass   $iniObjects   INI object
string   $id   object id

[ Top ]

method drawUserForm [line 582]

string drawUserForm( )

Builds PDF settings user interface.



Tags:

return:  Smarty fetch result
access:  private


[ Top ]

method generatePdfFile [line 1004]

string generatePdfFile( string $pdfBuffer)

Writes PDF file on disk.



Tags:

return:  filename
access:  private


Parameters:

string   $pdfBuffer   PDF content

[ Top ]

method getAllowedResolutions [line 417]

array getAllowedResolutions( )

Returns for each allowed format, the list of its allowed resolutions.

Warning: perform allowed formats filtering first!




Tags:

return:  array(<format> => array(<list of resolutions>))
access:  private


[ Top ]

method getArrayFromIni [line 160]

array getArrayFromIni( string $name, [boolean $simple = false])

Returns an array from a comma-separated list of a ini parameter.



Tags:

access:  private


Parameters:

string   $name   name of ini parameter
boolean   $simple   (default: false) true: returns a simplified array

[ Top ]

method getArrayFromList [line 143]

array getArrayFromList( array $list, [boolean $simple = false])

Returns an array from a comma-separated list string.



Tags:

access:  private


Parameters:

array   $list  
boolean   $simple   (default: false) true: returns a simplified array

[ Top ]

method getBlocks [line 114]

array getBlocks( )



Tags:

return:  array of activated PdfBlocks
access:  public


[ Top ]

method getConfiguration [line 669]

ExportConfiguration getConfiguration( [boolean $isOverview = false], [Bbox $mapBbox = NULL])

Builds export configuration.



Tags:

access:  private


Parameters:

boolean   $isOverview   true if configuring to get overview map
Bbox   $mapBbox   if set, indicates mainmap extent to outline in overview map

[ Top ]

method getCornerCoords [line 857]

string getCornerCoords( PdfBlock $block, MapResult $mapResult)

Returns (x,y) coords of given map corner using given format.



Tags:

access:  private


Parameters:

PdfBlock   $block  

[ Top ]

method getExport [line 913]

ExportOutput getExport( )



Tags:

return:  export result
access:  public
see:  ExportPlugin::getExport()


Overrides ExportPlugin::getExport() (Renders export)

[ Top ]

method getFilename [line 129]

string getFilename( )

Returns PDF file name.



Tags:

access:  public


[ Top ]

method getFormat [line 107]

PdfFormat getFormat( )

Returns formats object.



Tags:

access:  public


[ Top ]

method getGeneral [line 99]

PdfGeneral getGeneral( )

Returns general data object.



Tags:

access:  public


[ Top ]

method getGfxPath [line 754]

string getGfxPath( string $gfx)

Returns the absolute URL of $gfx, using the ResourceHandler



Tags:

access:  private


Parameters:

string   $gfx  

[ Top ]

method getLastBbox [line 639]

Bbox getLastBbox( )



Tags:

return:  bbox from last session-saved MapResult.
access:  private


[ Top ]

method getLastScale [line 651]

float getLastScale( )



Tags:

return:  scale from last session-saved MapResult.
access:  private


[ Top ]

method getNewMapDim [line 628]

int getNewMapDim( float $dist)

Returns given distance at selected printing resolution.



Tags:

return:  distance in pixels
access:  private


Parameters:

float   $dist   distance in PdfGeneral dist_unit

[ Top ]

method getPdfFileUrl [line 1019]

string getPdfFileUrl( string $filename, [boolean $filter = false])

Returns generated PDF file URL.



Tags:

return:  URL
access:  private


Parameters:

string   $filename   filename
boolean   $filter   if true, remove special chars from URL

[ Top ]

method getQueryResult [line 820]

array getQueryResult( MapResult $mapResult)

Transforms query results from MapResult into TableElements



Tags:

return:  array of TableElement
access:  private


Parameters:

MapResult   $mapResult  

[ Top ]

method getSelectedValue [line 185]

string getSelectedValue( string $name, array $choices, mixed $request, array $_REQUEST)

Returns value from $_REQUEST or else from default configuration.



Tags:

access:  private


Parameters:

array   $_REQUEST  
string   $name   name of parameter
array   $choices   available values

[ Top ]

method handleHttpGetRequest [line 567]

void handleHttpGetRequest( mixed $request)

Not used/implemented yet.



Tags:

access:  public
see:  GuiProvider::handleHttpGetRequest()


[ Top ]

method handleHttpPostRequest [line 519]

void handleHttpPostRequest( mixed $request, array $_REQUEST)

Sets PDF settings objects based on $_REQUEST and configuration data.



Tags:

access:  public
see:  GuiProvider::handleHttpPostRequest()


Parameters:

array   $_REQUEST  

[ Top ]

method handleInit [line 121]

void handleInit( mixed $exportPdfInit)



Tags:

access:  public
see:  InitUser::handleInit()


[ Top ]

method outputPdf [line 1043]

void outputPdf( string $pdfBuffer)

Outputs generated PDF file using config "output" medium.



Tags:

access:  public


Parameters:

string   $pdfBuffer   PDF content

[ Top ]

method overrideProperties [line 172]

void overrideProperties( object object $target, object object $from)

Updates $target properties with values from $from ones.



Tags:

access:  private


Parameters:

object object   $target   to override
object object   $from   to copy

[ Top ]

method renderForm [line 573]

void renderForm( Smarty $template)



Tags:

access:  public
see:  GuiProvider::renderForm()


Parameters:

Smarty   $template  

[ Top ]

method setAllowedFormats [line 395]

void setAllowedFormats( boolean $simple)

Updates available formats list considering allowed roles info.



Tags:

access:  private


Parameters:

boolean   $simple   if false, use general::formats keys as format ids

[ Top ]

method setFormat [line 482]

void setFormat( stdclass $iniObjects)

Populates PdfFormat object with selected format info.



Tags:

access:  private


Parameters:

stdclass   $iniObjects   objects from INI file

[ Top ]

method setGeneral [line 442]

void setGeneral( stdclass $iniObjects, [array $request = array()])

Populates PdfGeneral object.



Tags:

access:  private


Parameters:

stdclass   $iniObjects   objects from INI file
array   $request   user configs (usually $_REQUEST)

[ Top ]

method setMainMapDim [line 799]

void setMainMapDim( PdfWriter $pdf)

Sets mainmap dimensions according to selected format and orientation.



Tags:

access:  private


Parameters:

PdfWriter   $pdf  

[ Top ]

method setTypeHeader [line 1035]

void setTypeHeader( )

Set type (PDF) and charset header.



Tags:

access:  private


[ Top ]

method sortBlocksBy [line 203]

void sortBlocksBy( string $property)

Sorts blocks using $property criterium (in ASC order).



Tags:

access:  private


Parameters:

string   $property   name of property used to sort blocks

[ Top ]

method updateMapBlock [line 768]

void updateMapBlock( MapResult $mapObj, string $name, [string $msName = ''])

Updates Mapserver-generated maps PdfBlocks with data returned by CartoServer.



Tags:

access:  private


Parameters:

MapResult   $mapObj  
string   $name   name of PdfBlock to update
string   $msName   name of MapResult property

[ Top ]


Documentation generated on Wed, 6 Apr 2005 12:06:30 +0200 by phpDocumentor 1.3.0RC3