You are here

protected function ProviderUsingHandlerBase::getHandler in Geocoder 8.3

Same name and namespace in other branches
  1. 8.2 src/ProviderUsingHandlerBase.php \Drupal\geocoder\ProviderUsingHandlerBase::getHandler()

Returns the provider handler.

Return value

\Geocoder\Provider\Provider|\Drupal\geocoder_geofield\Geocoder\Provider\GeometryProviderInterface The provider plugin.

Throws

\ReflectionException

2 calls to ProviderUsingHandlerBase::getHandler()
ProviderUsingHandlerBase::doGeocode in src/ProviderUsingHandlerBase.php
ProviderUsingHandlerBase::getHandlerWrapper in src/ProviderUsingHandlerBase.php
Returns the V4 Stateful wrapper.
1 method overrides ProviderUsingHandlerBase::getHandler()
GoogleMapsBusiness::getHandler in src/Plugin/Geocoder/Provider/GoogleMapsBusiness.php
Returns the provider handler.

File

src/ProviderUsingHandlerBase.php, line 82

Class

ProviderUsingHandlerBase
Provides a base class for providers using handlers.

Namespace

Drupal\geocoder

Code

protected function getHandler() {
  if ($this->handler === NULL) {
    $definition = $this
      ->getPluginDefinition();
    $reflection_class = new \ReflectionClass($definition['handler']);
    $this->handler = $reflection_class
      ->newInstanceArgs($this
      ->getArguments());
  }
  return $this->handler;
}