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

Public Member Functions

 __construct (Exchange $exchange, Currencies $currencies)
 
 quote (Currency $baseCurrency, Currency $counterCurrency)
 

Static Public Member Functions

static registerCalculator ($calculator)
 

Detailed Description

Provides a way to get an exchange rate through a minimal set of intermediate conversions.

Author
Michael Cordingley Micha.nosp@m.el.C.nosp@m.ordin.nosp@m.gley.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 20 of file IndirectExchange.php.

Constructor & Destructor Documentation

◆ __construct()

Money\Exchange\IndirectExchange::__construct ( Exchange  $exchange,
Currencies  $currencies 
)
Parameters
Exchange$exchange
Currencies$currencies

Definition at line 56 of file IndirectExchange.php.

Member Function Documentation

◆ quote()

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

References Money\CurrencyPair\getConversionRatio().

◆ registerCalculator()

static Money\Exchange\IndirectExchange::registerCalculator (   $calculator)
static
Parameters
string$calculator

Definition at line 65 of file IndirectExchange.php.


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