PHP Class Swap\Swap

Author: Florian Voutzinos ([email protected])
Inheritance: implements swap\SwapInterface
Mostrar archivo Open project: florianv/swap Class Usage Examples

Public Methods

Method Description
__construct ( Exchanger\Contract\ExchangeRateProvider $exchangeRateProvider ) Creates a new Swap.
historical ( string $currencyPair, DateTimeInterface $date, array $options = [] ) : Exchanger\ExchangeRate Quotes a currency pair.
latest ( string $currencyPair, array $options = [] ) : Exchanger\ExchangeRate Quotes a currency pair.

Private Methods

Method Description
quote ( string $currencyPair, DateTimeInterface $date = null, array $options = [] ) : Exchanger\ExchangeRate Quotes a currency pair.

Method Details

__construct() public method

Creates a new Swap.
public __construct ( Exchanger\Contract\ExchangeRateProvider $exchangeRateProvider )
$exchangeRateProvider Exchanger\Contract\ExchangeRateProvider

historical() public method

Quotes a currency pair.
public historical ( string $currencyPair, DateTimeInterface $date, array $options = [] ) : Exchanger\ExchangeRate
$currencyPair string The currency pair like "EUR/USD"
$date DateTimeInterface An optional date for historical rates
$options array An array of query options
return Exchanger\ExchangeRate

latest() public method

Quotes a currency pair.
public latest ( string $currencyPair, array $options = [] ) : Exchanger\ExchangeRate
$currencyPair string The currency pair like "EUR/USD"
$options array An array of query options
return Exchanger\ExchangeRate