Rates
in package
Tags
Table of Contents
Properties
- $rates : array<string|int, mixed>
Methods
- __construct() : mixed
- Rates constructor.
- getRate() : float|null
- Gets rate for the requested currency code.
- getRates() : array<string|int, mixed>
- Gets rates.
- toArray() : array<string|int, array<string|int, mixed>>
- Return an array with rates value.
- update() : void
- Update rates.
- validateRates() : void
Properties
$rates
protected
array<string|int, mixed>
$rates
Rate[]
Methods
__construct()
Rates constructor.
public
__construct(array<string|int, mixed> $rates) : mixed
Parameters
- $rates : array<string|int, mixed>
-
Rate[]
Tags
getRate()
Gets rate for the requested currency code.
public
getRate(string $currencyCode) : float|null
Parameters
- $currencyCode : string
-
3-character currency code
Tags
Return values
float|nullgetRates()
Gets rates.
public
getRates() : array<string|int, mixed>
Return values
array<string|int, mixed> —Rate[]
toArray()
Return an array with rates value.
public
toArray() : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>update()
Update rates.
public
update(Client $bp) : void
Parameters
- $bp : Client
Tags
validateRates()
private
validateRates(array<string|int, mixed> $rates) : void
Parameters
- $rates : array<string|int, mixed>