Open Journal Systems  3.3.0
Money\Exchange\ExchangerExchange Class Reference
Inheritance diagram for Money\Exchange\ExchangerExchange:
Money\Exchange

Public Member Functions

 __construct (ExchangeRateProvider $exchanger)
 
 quote (Currency $baseCurrency, Currency $counterCurrency)
 

Detailed Description

Provides a way to get exchange rate from a third-party source and return a currency pair.

Author
Maksim (Ellrion) Platonov ellri.nosp@m.on11.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 19 of file ExchangerExchange.php.

Constructor & Destructor Documentation

◆ __construct()

Money\Exchange\ExchangerExchange::__construct ( ExchangeRateProvider  $exchanger)
Parameters
ExchangeRateProvider$exchanger

Definition at line 32 of file ExchangerExchange.php.

Member Function Documentation

◆ quote()

Money\Exchange\ExchangerExchange::quote ( Currency  $baseCurrency,
Currency  $counterCurrency 
)

{Returns a currency pair for the passed currencies with the rate coming from a third-party source.

Parameters
Currency$baseCurrency
Currency$counterCurrency
Returns
CurrencyPair
Exceptions
UnresolvableCurrencyPairExceptionWhen there is no currency pair (rate) available for the given currencies
}

Implements Money\Exchange.

Definition at line 40 of file ExchangerExchange.php.

References Money\Exception\UnresolvableCurrencyPairException\createFromCurrencies(), and Money\Currency\getCode().


The documentation for this class was generated from the following file: