BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
DataValues\Geo\Values\GlobeCoordinateValue Class Reference
Inheritance diagram for DataValues\Geo\Values\GlobeCoordinateValue:
Collaboration diagram for DataValues\Geo\Values\GlobeCoordinateValue:

Public Member Functions

 __construct (LatLongValue $latLong, $precision=null, $globe=null)
 
 serialize ()
 
 unserialize ($value)
 
 getSortKey ()
 
 getLatitude ()
 
 getLongitude ()
 
 getValue ()
 
 getLatLong ()
 
 getPrecision ()
 
 getGlobe ()
 
 getHash ()
 
 getArrayValue ()
 
- Public Member Functions inherited from DataValues\DataValueObject
 getHash ()
 
 equals ($value)
 
 getCopy ()
 
 getArrayValue ()
 
 toArray ()
 

Static Public Member Functions

static getType ()
 
static newFromArray ($data)
 

Public Attributes

const GLOBE_EARTH = 'http://www.wikidata.org/entity/Q2'
 

Additional Inherited Members

- Static Protected Member Functions inherited from DataValues\DataValueObject
static requireArrayFields ($data, array $fields)
 

Detailed Description

Class representing a geographical coordinate value.

Since
0.1

GPL-2.0+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Thiemo M├Ąttig

Constructor & Destructor Documentation

DataValues\Geo\Values\GlobeCoordinateValue::__construct ( LatLongValue  $latLong,
  $precision = null,
  $globe = null 
)
Parameters
LatLongValue$latLong
float | int | null$precisionin degrees, e.g. 0.01.
string | null$globeIRI, defaults to 'http://www.wikidata.org/entity/Q2'.
Exceptions
IllegalValueException

Member Function Documentation

DataValues\Geo\Values\GlobeCoordinateValue::getArrayValue ( )
See Also
DataValue::getArrayValue
Returns
array

Implements DataValues\DataValue.

DataValues\Geo\Values\GlobeCoordinateValue::getGlobe ( )

Returns the IRI of the globe on which the location resides.

Returns
string
DataValues\Geo\Values\GlobeCoordinateValue::getHash ( )
See Also
Hashable::getHash
Since
2.0
Returns
string

Implements Hashable.

DataValues\Geo\Values\GlobeCoordinateValue::getLatitude ( )
Returns
float
DataValues\Geo\Values\GlobeCoordinateValue::getLatLong ( )
Returns
LatLongValue
DataValues\Geo\Values\GlobeCoordinateValue::getLongitude ( )
Returns
float
DataValues\Geo\Values\GlobeCoordinateValue::getPrecision ( )

Returns the precision of the coordinate in degrees, e.g. 0.01.

Returns
float|int|null
DataValues\Geo\Values\GlobeCoordinateValue::getSortKey ( )
See Also
DataValue::getSortKey
Returns
float

Implements DataValues\DataValue.

static DataValues\Geo\Values\GlobeCoordinateValue::getType ( )
static
See Also
DataValue::getType
Returns
string

Implements DataValues\DataValue.

DataValues\Geo\Values\GlobeCoordinateValue::getValue ( )
See Also
DataValue::getValue
Returns
self

Implements DataValues\DataValue.

static DataValues\Geo\Values\GlobeCoordinateValue::newFromArray (   $data)
static

Constructs a new instance from the provided data. Required for

See Also
DataValueDeserializer. This is expected to round-trip with
getArrayValue.
Deprecated:
since 2.0.1. Static DataValue::newFromArray constructors like this are underspecified (not in the DataValue interface), and misleadingly named (should be named newFromArrayValue). Instead, use DataValue builder callbacks in
See Also
DataValueDeserializer.
Parameters
mixed$dataWarning! Even if this is expected to be a value as returned by
See Also
getArrayValue, callers of this specific newFromArray implementation can not guarantee this. This is not even guaranteed to be an array!
Exceptions
IllegalValueExceptionif $data is not in the expected format. Subclasses of InvalidArgumentException are expected and properly handled by
See Also
DataValueDeserializer.
Returns
self
DataValues\Geo\Values\GlobeCoordinateValue::serialize ( )
See Also
Serializable::serialize
Returns
string

Implements Serializable.

DataValues\Geo\Values\GlobeCoordinateValue::unserialize (   $value)
See Also
Serializable::unserialize
Parameters
string$value
Exceptions
IllegalValueException

Implements Serializable.

Member Data Documentation

const DataValues\Geo\Values\GlobeCoordinateValue::GLOBE_EARTH = 'http://www.wikidata.org/entity/Q2'

Wikidata concept URI for the Earth. Used as default value when no other globe was specified.


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