PHP Класс PMA\libraries\gis\GISVisualization

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
asOl ( ) : string Get the code for visualization with OpenLayers.
asPng ( ) : string Get the visualization as a PNG.
asSVG ( ) : string Get the visualization as a SVG.
get ( string $sql_query, array $options, integer $row, integer $pos ) : GISVisualization Factory
getByData ( array $data, array $options ) : GISVisualization Get visualization
getSettings ( ) : array Returns the settings array
hasSrid ( ) : boolean Check if data has SRID
setUserSpecifiedSettings ( array $userSpecifiedSettings ) : void Set user specified settings
toFile ( string $filename, string $format ) : void Convert file to given format
toFileAsPdf ( string $file_name ) : void Saves as a PDF to a file.
toFileAsPng ( string $file_name ) : void Saves as a PNG image to a file.
toFileAsSvg ( string $file_name ) : void Saves as a SVG image to a file.
toImage ( string $format ) : string Convert file to image

Защищенные методы

Метод Описание
init ( ) : void All the variable initialization, options handling has to be done here.

Приватные методы

Метод Описание
__construct ( string $sql_query, array $options, integer $row, integer $pos, array $data = null ) Constructor. Stores user specified options.
_fetchRawData ( ) : string Returns raw data for GIS visualization.
_handleOptions ( ) : void A function which handles passed parameters. Useful if desired chart needs to be a little bit different from the default one.
_modifySqlQuery ( string $sql_query, integer $rows, integer $pos ) : string Returns sql for fetching raw data
_png ( ) : resource Generate the visualization in PNG format.
_prepareDataSet ( array $data, array $scale_data, string $format, object $results ) : mixed Prepares and return the dataset as needed by the visualization.
_sanitizeName ( string $file_name, string $ext ) : string Sanitizes the file name.
_scaleDataSet ( array $data ) : array Calculates the scale, horizontal and vertical offset that should be used.
_svg ( ) : string Generate the visualization in SVG format.
_toFile ( string $file_name, string $type, string $ext ) : void Handles common tasks of writing the visualization to file for various formats.

Описание методов

asOl() публичный Метод

Get the code for visualization with OpenLayers.
public asOl ( ) : string
Результат string the code for visualization with OpenLayers

asPng() публичный Метод

Get the visualization as a PNG.
public asPng ( ) : string
Результат string the visualization as a PNG

asSVG() публичный Метод

Get the visualization as a SVG.
public asSVG ( ) : string
Результат string the visualization as a SVG

get() публичный статический Метод

Factory
public static get ( string $sql_query, array $options, integer $row, integer $pos ) : GISVisualization
$sql_query string SQL to fetch raw data for visualization
$options array Users specified options
$row integer number of rows
$pos integer start position
Результат GISVisualization

getByData() публичный статический Метод

Get visualization
public static getByData ( array $data, array $options ) : GISVisualization
$data array Raw data, if set, parameters other than $options will be ignored
$options array Users specified options
Результат GISVisualization

getSettings() публичный Метод

Returns the settings array
public getSettings ( ) : array
Результат array the settings array

hasSrid() публичный Метод

Check if data has SRID
public hasSrid ( ) : boolean
Результат boolean

init() защищенный Метод

All the variable initialization, options handling has to be done here.
protected init ( ) : void
Результат void

setUserSpecifiedSettings() публичный Метод

Set user specified settings
public setUserSpecifiedSettings ( array $userSpecifiedSettings ) : void
$userSpecifiedSettings array User specified settings
Результат void

toFile() публичный Метод

Convert file to given format
public toFile ( string $filename, string $format ) : void
$filename string Filename
$format string Output format
Результат void

toFileAsPdf() публичный Метод

Saves as a PDF to a file.
public toFileAsPdf ( string $file_name ) : void
$file_name string File name
Результат void

toFileAsPng() публичный Метод

Saves as a PNG image to a file.
public toFileAsPng ( string $file_name ) : void
$file_name string File name
Результат void

toFileAsSvg() публичный Метод

Saves as a SVG image to a file.
public toFileAsSvg ( string $file_name ) : void
$file_name string File name
Результат void

toImage() публичный Метод

Convert file to image
public toImage ( string $format ) : string
$format string Output format
Результат string File