protected function Random::doGeocode in Geocoder 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Geocoder/Provider/Random.php \Drupal\geocoder\Plugin\Geocoder\Provider\Random::doGeocode()
Performs the geocoding.
Parameters
string $source: The data to be geocoded.
Return value
\Geocoder\Model\AddressCollection|\Geometry|null The address collection, or the geometry, or NULL.
Overrides ProviderBase::doGeocode
File
- src/
Plugin/ Geocoder/ Provider/ Random.php, line 38
Class
- Random
- Class Random.
Namespace
Drupal\geocoder\Plugin\Geocoder\ProviderCode
protected function doGeocode($source) {
return new AddressCollection([
$this
->getAddressFactory()
->createFromArray($this
->getRandomResult()),
]);
}