DecimalRate
in package
FinalYes
Разбор десятичной записи курса («1.0850», «2», «.5») в дробь.
Table of Contents
Properties
Methods
- __construct() : mixed
- parse() : ExchangeRate
- digits() : int
- parts() : array{whole: string, fraction: string}
Properties
$math read-only
private
IntegerMath
$math
Methods
__construct()
public
__construct(IntegerMath $math) : mixed
Parameters
- $math : IntegerMath
parse()
public
parse(Currency $base, Currency $quote, string $decimal) : ExchangeRate
Parameters
Tags
Return values
ExchangeRatedigits()
private
digits(string $digits) : int
Parameters
- $digits : string
Tags
Return values
intparts()
private
parts(string $trimmed) : array{whole: string, fraction: string}
Parameters
- $trimmed : string