Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct (Currencies $currencies) | |
parse ($money, $forceCurrency=null) | |
Data Fields | |
const | DECIMAL_PATTERN = '/^(?P<sign>-)?(?P<digits>0|[1-9]\d*)?\.?(?P<fraction>\d+)?$/' |
Parses a decimal string into a Money object.
Definition at line 17 of file DecimalMoneyParser.php.
Money\Parser\DecimalMoneyParser::__construct | ( | Currencies | $currencies | ) |
Currencies | $currencies |
Definition at line 32 of file DecimalMoneyParser.php.
Money\Parser\DecimalMoneyParser::parse | ( | $money, | |
$forceCurrency = null |
|||
) |
{Parses a string into a Money object (including currency).
string | $money | |
Currency | string | null | $forceCurrency |
Exception |
Implements Money\MoneyParser.
Definition at line 40 of file DecimalMoneyParser.php.
References Money\Number\roundMoneyValue().
const Money\Parser\DecimalMoneyParser::DECIMAL_PATTERN = '/^(?P<sign>-)?(?P<digits>0|[1-9]\d*)?\.?(?P<fraction>\d+)?$/' |
Definition at line 19 of file DecimalMoneyParser.php.