MapsMapper Class Reference

List of all members.

Static Public Member Functions

static setDefaultParValues (array $params, array $serviceDefaults, $strict=true)
 Sets the default map properties and returns the new array.
static getJSBoolValue ($bool)
 Returns the JS version (true/false as string) of the provided boolean parameter.
static enforceArrayValues (&$values, $delimeter= ',')
 Turns the provided values into an array by splitting it on comma's if it's not an array yet.
static createJSItemsString (array $items, array $defaultItems=null, $asStrings=true, $toLower=true)
 Checks if the items array has members, and sets it to the default when this is not the case.
static getValidParams (array $paramz, array $serviceParameters)
 Returns a valid version of the provided parameter array.
static getValidService ($service)
 Returns a valid service.
static getMainServiceName ($service)
 Checks if the service name is an alias for an actual service, and changes it into the main service name if this is the case.
static getValidTypes ($types, &$defaults, &$defaultsAreValid, $validationFunction)

Static Private Member Functions

static getMainParamName ($paramName, array $allowedParms)
 Checks if the patameter name is an alias for an actual parameter, and changes it into the main paremeter name if this is the case.

Static Private Attributes

static $mainParams


Detailed Description

Definition at line 16 of file Maps_Mapper.php.


Member Function Documentation

static MapsMapper::setDefaultParValues ( array $  params,
array $  serviceDefaults,
strict = true 
) [static]

Sets the default map properties and returns the new array.

This function also ensures all the properties are present, even when being empty, which is important for the weakly typed classes using them.

Parameters:
array $params Array containing the current set of pareters.
array $serviceDefaults Array with the default parameters and their values for the used mapping service.
boolean $strict If set to false, values which a key that does not exist in the $map array will be retained.
Returns:
array

Definition at line 48 of file Maps_Mapper.php.

References $egMapsDefaultService, $egMapsMapHeight, $egMapsMapLat, $egMapsMapLon, and $egMapsMapWidth.

Referenced by MapsMapFeature::manageMapProperties().

static MapsMapper::getJSBoolValue ( bool  )  [static]

Returns the JS version (true/false as string) of the provided boolean parameter.

Parameters:
boolean $bool
Returns:
string

Definition at line 78 of file Maps_Mapper.php.

Referenced by MapsYahooMapsUtils::getAutozoomJSValue(), and MapsGoogleMapsUtils::getAutozoomJSValue().

static MapsMapper::enforceArrayValues ( &$  values,
delimeter = ',' 
) [static]

Turns the provided values into an array by splitting it on comma's if it's not an array yet.

Parameters:
unknown_type $values
string $delimeter

Definition at line 89 of file Maps_Mapper.php.

Referenced by MapsOpenLayers::addSpecificMapHTML(), and MapsMapFeature::manageMapProperties().

static MapsMapper::createJSItemsString ( array $  items,
array $  defaultItems = null,
asStrings = true,
toLower = true 
) [static]

Checks if the items array has members, and sets it to the default when this is not the case.

Then returns an imploded/joined, comma seperated, version of the array as string.

Parameters:
array $items
array $defaultItems
boolean $asStrings
Returns:
string

Definition at line 103 of file Maps_Mapper.php.

Referenced by MapsYahooMapsUtils::createControlsString(), MapsOpenLayersUtils::createControlsString(), MapsGoogleMapsUtils::createControlsString(), MapsYahooMapsUtils::createTypesString(), and MapsGoogleMapsUtils::createTypesString().

static MapsMapper::getValidParams ( array $  paramz,
array $  serviceParameters 
) [static]

Returns a valid version of the provided parameter array.

Paramaters that are not allowed will be ignored, and alias parameter names will be changed to main parameter names, using getMainParamName().

Parameters:
array $paramz
array $serviceParameters
Returns:
array

Definition at line 118 of file Maps_Mapper.php.

Referenced by MapsMapFeature::manageMapProperties().

static MapsMapper::getMainParamName ( paramName,
array $  allowedParms 
) [static, private]

Checks if the patameter name is an alias for an actual parameter, and changes it into the main paremeter name if this is the case.

Parameters:
string $paramName
array $allowedParms
Returns:
string

Definition at line 141 of file Maps_Mapper.php.

static MapsMapper::getValidService ( service  )  [static]

Returns a valid service.

When an invalid service is provided, the default one will be returned. Aliases are also chancged into the main service names

See also:
MapsMapper::getMainServiceName().
Parameters:
string $service
Returns:
string

Definition at line 161 of file Maps_Mapper.php.

References $egMapsAvailableServices, and $egMapsDefaultService.

Referenced by MapsParserFunctions::changeAddressToCoords(), and MapsParserFunctions::displayPointRender().

static MapsMapper::getMainServiceName ( service  )  [static]

Checks if the service name is an alias for an actual service, and changes it into the main service name if this is the case.

Parameters:
string $service
Returns:
string

Definition at line 177 of file Maps_Mapper.php.

References $egMapsServices.

static MapsMapper::getValidTypes ( types,
&$  defaults,
&$  defaultsAreValid,
validationFunction 
) [static]


Member Data Documentation

MapsMapper::$mainParams [static, private]

Initial value:

 array
                        (
                        'service' => array(),
                        'coordinates' => array('coords', 'location'),
                        'zoom' => array(),
                        'centre' => array('center'),
                        'width' => array(),
                        'height' => array(),
                        'controls' => array(),
                        'label' => array(),
                        'title' => array()                              
                        )

Definition at line 24 of file Maps_Mapper.php.


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

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6