CurrencyService
in package
Class CurrencyService
Table of Contents
Constants
- API_KEY = 'fcb0e2e0b6c38c1032540f61ef1d1747'
Properties
- $cachedRates : mixed
- $configService : ConfigService|object
- $container : ContainerInterface
- $rates : array<string|int, mixed>|string
Methods
- __construct() : mixed
- CurrencyService constructor.
- convert() : false|float|int
- Convert from euro to another base
- getBaseRate() : false|mixed
- Get base rate
- setDate() : mixed
Constants
API_KEY
public
mixed
API_KEY
= 'fcb0e2e0b6c38c1032540f61ef1d1747'
Properties
$cachedRates
private
mixed
$cachedRates
$configService
private
ConfigService|object
$configService
$container
private
ContainerInterface
$container
$rates
private
array<string|int, mixed>|string
$rates
= []
Methods
__construct()
CurrencyService constructor.
public
__construct(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
convert()
Convert from euro to another base
public
convert(mixed $value[, string $to = 'USD' ]) : false|float|int
Parameters
- $value : mixed
- $to : string = 'USD'
Return values
false|float|intgetBaseRate()
Get base rate
public
getBaseRate(mixed $code) : false|mixed
Parameters
- $code : mixed
Return values
false|mixedsetDate()
public
setDate(DateTime $dateTime) : mixed
Parameters
- $dateTime : DateTime