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

Public Member Functions

 __construct (array $list)
 
 quote (Currency $baseCurrency, Currency $counterCurrency)
 

Detailed Description

Provides a way to get exchange rate from a static list (array).

Author
Frederik Bosch f.bos.nosp@m.ch@g.nosp@m.enkgo.nosp@m..nl

Definition at line 15 of file FixedExchange.php.

Constructor & Destructor Documentation

◆ __construct()

Money\Exchange\FixedExchange::__construct ( array  $list)
Parameters
array$list

Definition at line 28 of file FixedExchange.php.

Member Function Documentation

◆ quote()

Money\Exchange\FixedExchange::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 36 of file FixedExchange.php.

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


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