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

Public Member Functions

 __construct ($latitude, $longitude)
 
 serialize ()
 
 unserialize ($value)
 
 getSortKey ()
 
 getValue ()
 
 getLatitude ()
 
 getLongitude ()
 
 getArrayValue ()
 
- Public Member Functions inherited from DataValues\DataValueObject
 getHash ()
 
 equals ($value)
 
 getCopy ()
 
 getArrayValue ()
 
 toArray ()
 

Static Public Member Functions

static getType ()
 
static newFromArray ($data)
 

Protected Member Functions

 assertIsLatitude ($latitude)
 
 assertIsLongitude ($longitude)
 

Protected Attributes

 $latitude
 
 $longitude
 

Additional Inherited Members

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

Detailed Description

Object representing a geographic point.

Latitude is specified in degrees within the range [-360, 360]. Longitude is specified in degrees within the range [-360, 360].

Since
0.1

GPL-2.0+

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

Constructor & Destructor Documentation

DataValues\Geo\Values\LatLongValue::__construct (   $latitude,
  $longitude 
)
Parameters
float | int$latitude
float | int$longitude
Exceptions
InvalidArgumentException

Member Function Documentation

DataValues\Geo\Values\LatLongValue::assertIsLatitude (   $latitude)
protected
Parameters
float$latitude
DataValues\Geo\Values\LatLongValue::assertIsLongitude (   $longitude)
protected
Parameters
float$longitude
DataValues\Geo\Values\LatLongValue::getArrayValue ( )
See Also
DataValue::getArrayValue
Returns
float[]

Implements DataValues\DataValue.

DataValues\Geo\Values\LatLongValue::getLatitude ( )
Returns
float
DataValues\Geo\Values\LatLongValue::getLongitude ( )
Returns
float
DataValues\Geo\Values\LatLongValue::getSortKey ( )
See Also
DataValue::getSortKey
Returns
float

Implements DataValues\DataValue.

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

Implements DataValues\DataValue.

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

Implements DataValues\DataValue.

static DataValues\Geo\Values\LatLongValue::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
InvalidArgumentExceptionif $data is not in the expected format. Subclasses of InvalidArgumentException are expected and properly handled by
See Also
DataValueDeserializer.
Returns
self
DataValues\Geo\Values\LatLongValue::serialize ( )
See Also
Serializable::serialize
Returns
string

Implements Serializable.

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

Implements Serializable.


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