You are here

public function ExchangeRateProviderDecorator::load in Currency 8.3

Parameters

string $sourceCurrencyCode:

string $destinationCurrencyCode:

Return value

\Drupal\currency\ExchangeRateInterface|null

Overrides ExchangeRateProviderInterface::load

File

src/Plugin/Currency/ExchangeRateProvider/ExchangeRateProviderDecorator.php, line 41

Class

ExchangeRateProviderDecorator
Provides an exchange rate provider decorator.

Namespace

Drupal\currency\Plugin\Currency\ExchangeRateProvider

Code

public function load($source_currency_code, $destination_currency_code) {
  $exchange_rate = $this->exchangeRateProvider
    ->load($source_currency_code, $destination_currency_code);
  return ExchangeRate::createFromExchangeRate($exchange_rate, $this
    ->getPluginId());
}