ExchangeRate
in package
FinalYes
Курс как несократимая дробь числитель/знаменатель. Float не используется.
Table of Contents
Properties
- $base : Currency
- $denominator : int
- $math : IntegerMath
- $numerator : int
- $quote : Currency
Methods
- __construct() : mixed
- base() : Currency
- cross() : self
- Последовательное применение двух курсов: base→pivot и pivot→quote.
- denominator() : int
- inverse() : self
- numerator() : int
- pair() : CurrencyPair
- quote() : Currency
- withMarkup() : self
- Наценка в базисных пунктах (100 = 1 процент) к величине курса.
Properties
$base read-only
private
Currency
$base
$denominator read-only
private
int
$denominator
$math read-only
private
IntegerMath
$math
$numerator read-only
private
int
$numerator
$quote read-only
private
Currency
$quote
Methods
__construct()
public
__construct(Currency $base, Currency $quote, int $numerator, int $denominator, IntegerMath $math) : mixed
Parameters
- $base : Currency
- $quote : Currency
- $numerator : int
- $denominator : int
- $math : IntegerMath
Tags
base()
public
base() : Currency
Return values
Currencycross()
Последовательное применение двух курсов: base→pivot и pivot→quote.
public
cross(self $next) : self
Parameters
- $next : self
Tags
Return values
selfdenominator()
public
denominator() : int
Return values
intinverse()
public
inverse() : self
Return values
selfnumerator()
public
numerator() : int
Return values
intpair()
public
pair([string|null $date = null ]) : CurrencyPair
Parameters
- $date : string|null = null
Return values
CurrencyPairquote()
public
quote() : Currency
Return values
CurrencywithMarkup()
Наценка в базисных пунктах (100 = 1 процент) к величине курса.
public
withMarkup(int $basisPoints, RoundingMode $mode) : self
Parameters
- $basisPoints : int
- $mode : RoundingMode