You are here

interface ExchangeRateProviderInterface in Currency 8.3

Defines a currency exchange rate provider plugin.

Hierarchy

Expanded class hierarchy of ExchangeRateProviderInterface

All classes that implement ExchangeRateProviderInterface

3 files declare their use of ExchangeRateProviderInterface
CurrencyExchangeTest.php in tests/src/Unit/Plugin/Filter/CurrencyExchangeTest.php
FixedRatesFormTest.php in tests/src/Unit/Controller/FixedRatesFormTest.php
FixedRatesFormTest.php in tests/src/Unit/Form/FixedRatesFormTest.php

File

src/Plugin/Currency/ExchangeRateProvider/ExchangeRateProviderInterface.php, line 11

Namespace

Drupal\currency\Plugin\Currency\ExchangeRateProvider
View source
interface ExchangeRateProviderInterface extends GenericExchangeRateProviderInterface, PluginInspectionInterface {

  /**
   * {@inheritdoc}
   *
   * @param string $sourceCurrencyCode
   * @param string $destinationCurrencyCode
   *
   * @return \Drupal\currency\ExchangeRateInterface|null
   */
  public function load($sourceCurrencyCode, $destinationCurrencyCode);

  /**
   * {@inheritdoc}
   *
   * @param array[] $currencyCodes
   *   Keys are the ISO 4217 codes of source currencies, values are arrays that
   *   contain ISO 4217 codes of destination currencies. Example:
   *   [
   *     'EUR' => ['NLG', 'DEM', 'XXX'],
   *   ]
   *
   * @return array[]
   *   Keys are the ISO 4217 codes of source currencies, values are arrays of
   *   which the keys are ISO 4217 codes of destination currencies and values
   *   are \Drupal\currency\ExchangeRateInterface objects, or NULL for
   *   combinations of currencies for which no exchange rate could be found.
   */
  public function loadMultiple(array $currencyCodes);

}

Members

Namesort descending Modifiers Type Description Overrides
ExchangeRateProviderInterface::load public function 1
ExchangeRateProviderInterface::loadMultiple public function 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2