CurrencyCatalog
in package
FinalYes
Справочник ISO 4217. По умолчанию читает data/iso4217.csv, исторические коды подгружаются отдельно.
Table of Contents
Properties
- $byCode : array<string, Currency>
- $byNumeric : array<int, Currency>
Methods
- __construct() : mixed
- all() : Generator<string, Currency>
- count() : int
- get() : Currency
- getByNumeric() : Currency
- has() : bool
- load() : void
- Свои валюты поверх ISO 4217, например data/crypto.csv. Номер 0 — валюта без номера ISO.
- loadHistorical() : void
- ingest() : void
- ingestLine() : void
Properties
$byCode
private
array<string, Currency>
$byCode
= []
$byNumeric
private
array<int, Currency>
$byNumeric
= []
Methods
__construct()
public
__construct([string|null $csv = null ][, string|null $path = null ]) : mixed
Parameters
- $csv : string|null = null
- $path : string|null = null
Tags
all()
public
all() : Generator<string, Currency>
Return values
Generator<string, Currency>count()
public
count() : int
Return values
intget()
public
get(string $code) : Currency
Parameters
- $code : string
Tags
Return values
CurrencygetByNumeric()
public
getByNumeric(int $numeric) : Currency
Parameters
- $numeric : int
Tags
Return values
Currencyhas()
public
has(string $code) : bool
Parameters
- $code : string
Return values
boolload()
Свои валюты поверх ISO 4217, например data/crypto.csv. Номер 0 — валюта без номера ISO.
public
load(string $csv) : void
Parameters
- $csv : string
Tags
loadHistorical()
public
loadHistorical(string $csv) : void
Parameters
- $csv : string
Tags
ingest()
private
ingest(string $csv, CurrencyStatus $status) : void
Parameters
- $csv : string
- $status : CurrencyStatus
Tags
ingestLine()
private
ingestLine(string $line, CurrencyStatus $status) : void
Parameters
- $line : string
- $status : CurrencyStatus