BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SMWDIGeoCoord Class Reference
Inheritance diagram for SMWDIGeoCoord:
Collaboration diagram for SMWDIGeoCoord:

Public Member Functions

 __construct ()
 
 getDIType ()
 
 getCoordinateSet ()
 
 getSortKey ()
 
 getSerialization ()
 
 getLatitude ()
 
 getLongitude ()
 
 getAltitude ()
 
 equals (SMWDataItem $di)
 
- Public Member Functions inherited from SMWDataItem
 getDIType ()
 
 getSortKey ()
 
 equals (SMWDataItem $di)
 
 getSortKeyDataItem ()
 
 getSerialization ()
 
 getHash ()
 
 __toString ()
 

Static Public Member Functions

static doUnserialize ($serialization)
 
- Static Public Member Functions inherited from SMWDataItem
static newFromSerialization ($diType, $serialization)
 
static getDataItemClassNameForId ($diType)
 

Protected Attributes

 $latitude
 
 $longitude
 
 $altitude = null
 

Additional Inherited Members

- Public Attributes inherited from SMWDataItem
const TYPE_NOTYPE = 0
 Data item ID that can be used to indicate that no data item class is appropriate.
 
const TYPE_NUMBER = 1
 Data item ID for SMWDINumber.
 
const TYPE_STRING = 2
 
const TYPE_BLOB = 2
 Data item ID for SMWDIBlob.
 
const TYPE_BOOLEAN = 4
 Data item ID for SMWDIBoolean.
 
const TYPE_URI = 5
 Data item ID for SMWDIUri.
 
const TYPE_TIME = 6
 Data item ID for SMWDITimePoint.
 
const TYPE_GEO = 7
 Data item ID for SMWDIGeoCoord.
 
const TYPE_CONTAINER = 8
 Data item ID for SMWDIContainer.
 
const TYPE_WIKIPAGE = 9
 Data item ID for SMWDIWikiPage.
 
const TYPE_CONCEPT = 10
 Data item ID for SMWDIConcept.
 
const TYPE_PROPERTY = 11
 Data item ID for SMWDIProperty.
 
const TYPE_ERROR = 12
 Data item ID for SMWDIError.
 

Detailed Description

Implementation of dataitems that are geographic coordinates.

Since
1.6

GNU GPL v3

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

Constructor & Destructor Documentation

SMWDIGeoCoord::__construct ( )

Constructor. Takes a latitude and longitude, and optionally an altitude. These can be provided in 2 forms:

  • An associative array with lat, lon and alt keys
  • Lat, lon and alt arguments

The second way to provide the arguments, as well as the altitude argument, where introduced in SMW 1.7.

Member Function Documentation

static SMWDIGeoCoord::doUnserialize (   $serialization)
static

Create a data item from the provided serialization string and type ID.

Note
PHP can convert any string to some number, so we do not do validation here (because this would require less efficient parsing).
Since
1.6
Parameters
string$serialization
Returns
SMWDIGeoCoord
SMWDIGeoCoord::getAltitude ( )

Returns the altitude if set, null otherwise.

Since
1.7
Returns
float|null
SMWDIGeoCoord::getCoordinateSet ( )

Returns the coordinate set as an array with lat and long (and alt) keys pointing to float values.

Since
1.6
Returns
array
SMWDIGeoCoord::getDIType ( )

(non-PHPdoc)

See Also
SMWDataItem::getDIType()
SMWDIGeoCoord::getLatitude ( )

Returns the latitude.

Since
1.6
Returns
float
SMWDIGeoCoord::getLongitude ( )

Returns the longitude.

Since
1.6
Returns
float
SMWDIGeoCoord::getSerialization ( )

(non-PHPdoc)

See Also
SMWDataItem::getSerialization()
SMWDIGeoCoord::getSortKey ( )

(non-PHPdoc)

See Also
SMWDataItem::getSortKey()

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