class DmsPoint in Geofield 8
Helper class to map DMS Point structure.
Hierarchy
- class \Drupal\geofield\DmsPoint
Expanded class hierarchy of DmsPoint
2 files declare their use of DmsPoint
- DmsConverterTest.php in tests/
src/ Unit/ DmsConverterTest.php - GeofieldDmsWidget.php in src/
Plugin/ Field/ FieldWidget/ GeofieldDmsWidget.php
File
- src/
DmsPoint.php, line 8
Namespace
Drupal\geofieldView source
class DmsPoint {
/**
* The longitude component.
*
* @var array
*/
protected $lon;
/**
* The latitude component.
*
* @var array
*/
protected $lat;
/**
* DmsPoint constructor.
*
* @param array $lon
* The longitude components.
* @param array $lat
* The latitude components.
*/
public function __construct(array $lon, array $lat) {
$this->lat = $lat;
$this->lon = $lon;
}
/**
* Retrieves an object property.
*
* @param string $property
* The property to get.
*
* @return array|null
* The property if exists, otherwise NULL.
*/
public function get($property) {
return isset($this->{$property}) ? $this->{$property} : NULL;
}
/**
* Get the Longitude property.
*
* @return array
* The lon components.
*/
public function getLon() {
return $this->lon;
}
/**
* Set the Longitude property.
*
* @param array $lon
* The lon components.
*/
public function setLon(array $lon) {
$this->lon = $lon;
}
/**
* Get the Latitude property.
*
* @return array
* The lat components.
*/
public function getLat() {
return $this->lat;
}
/**
* Set the Latitude property.
*
* @param array $lat
* The lat components.
*/
public function setLat(array $lat) {
$this->lat = $lat;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DmsPoint:: |
protected | property | The latitude component. | |
DmsPoint:: |
protected | property | The longitude component. | |
DmsPoint:: |
public | function | Retrieves an object property. | |
DmsPoint:: |
public | function | Get the Latitude property. | |
DmsPoint:: |
public | function | Get the Longitude property. | |
DmsPoint:: |
public | function | Set the Latitude property. | |
DmsPoint:: |
public | function | Set the Longitude property. | |
DmsPoint:: |
public | function | DmsPoint constructor. |