Semantic MediaWiki and related extensions
Static Public Member Functions | List of all members
MapsMapper Class Reference

Static Public Member Functions

static encodeJsVar ($value)
 
static getCommonParameters ()
 
static getFileUrl ($file)
 
static getBaseMapJSON ($serviceName)
 

Detailed Description

A class that holds static helper functions for generic mapping-related functions.

Since
0.1
Deprecated:

GNU GPL v2+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

static MapsMapper::encodeJsVar (   $value)
static

Encode a variable of unknown type to JavaScript. Arrays are converted to JS arrays, objects are converted to JS associative arrays (objects). So cast your PHP associative arrays to objects before passing them to here.

This is a copy of

See also
Xml::encodeJsVar which fixes incorrect behaviour with floats.
Since
0.7.1
Parameters
mixed$value
Returns
string
static MapsMapper::getBaseMapJSON (   $serviceName)
static

Returns JS to init the vars to hold the map data when they are not there already.

Since
1.0
Deprecated:
Parameters
string$serviceName
Returns
string
static MapsMapper::getCommonParameters ( )
static

This function returns the definitions for the parameters used by every map feature.

Returns
array
static MapsMapper::getFileUrl (   $file)
static

Resolves the url of images provided as wiki page; leaves others alone.

Since
1.0
Deprecated:
Parameters
string$file
Returns
string

The documentation for this class was generated from the following file: