class Geometry in Geocoder 8.2
Same name in this branch
- 8.2 modules/geocoder_geofield/src/Geocoder/Dumper/Geometry.php \Drupal\geocoder_geofield\Geocoder\Dumper\Geometry
- 8.2 modules/geocoder_geofield/src/Plugin/Geocoder/Dumper/Geometry.php \Drupal\geocoder_geofield\Plugin\Geocoder\Dumper\Geometry
Same name and namespace in other branches
- 8.3 modules/geocoder_geofield/src/Geocoder/Dumper/Geometry.php \Drupal\geocoder_geofield\Geocoder\Dumper\Geometry
Dumper.
Hierarchy
- class \Drupal\geocoder_geofield\Geocoder\Dumper\Geometry implements \Geocoder\Dumper\Dumper
Expanded class hierarchy of Geometry
File
- modules/
geocoder_geofield/ src/ Geocoder/ Dumper/ Geometry.php, line 11
Namespace
Drupal\geocoder_geofield\Geocoder\DumperView source
class Geometry implements Dumper {
/**
* Dumper.
*
* @var \Geocoder\Dumper\Dumper
*/
private $dumper;
/**
* Geophp interface.
*
* @var \Drupal\geofield\GeoPHP\GeoPHPInterface
*/
private $geophp;
/**
* {@inheritdoc}
*/
public function __construct() {
$this->dumper = \Drupal::service('plugin.manager.geocoder.dumper')
->createInstance('geojson');
$this->geophp = \Drupal::service('geofield.geophp');
}
/**
* {@inheritdoc}
*/
public function dump(Address $address) {
return $this->geophp
->load($this->dumper
->dump($address), 'json');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Geometry:: |
private | property | Dumper. | 1 |
Geometry:: |
private | property | Geophp interface. | 1 |
Geometry:: |
public | function | 1 | |
Geometry:: |
public | function |