Open Journal Systems  3.3.0
Money\Converter Class Reference

Public Member Functions

 __construct (Currencies $currencies, Exchange $exchange)
 
 convert (Money $money, Currency $counterCurrency, $roundingMode=Money::ROUND_HALF_UP)
 

Detailed Description

Provides a way to convert Money to Money in another Currency using an exchange rate.

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

Definition at line 10 of file Converter.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 32 of file Converter.php.

Member Function Documentation

◆ convert()

Money\Converter::convert ( Money  $money,
Currency  $counterCurrency,
  $roundingMode = Money::ROUND_HALF_UP 
)
Parameters
Money$money
Currency$counterCurrency
int$roundingMode
Returns
Money

Definition at line 45 of file Converter.php.

References Money\Money\getCurrency(), and Money\Money\multiply().


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