You are here

GeocoderThrottleInterface.php in Geocoder 8.3

Namespace

Drupal\geocoder

File

src/GeocoderThrottleInterface.php
View source
<?php

namespace Drupal\geocoder;


/**
 * Provides a geocoder throttle interface.
 */
interface GeocoderThrottleInterface {

  /**
   * Sleeps until the throttle rate is not reached anymore.
   *
   * @param string $key
   *   An identifier for the service where we send the requests.
   * @param array|null $throttle_info
   *   An associative array with:
   *   - period: in seconds
   *   - limit: number of requests allowed in the period
   *   or null not to limit the requests.
   *
   * @return void|NULL
   */
  public function waitForAvailability(string $key, array $throttle_info);

}

Interfaces

Namesort descending Description
GeocoderThrottleInterface Provides a geocoder throttle interface.