This component provides features for ISO 4217 standard - get currency codes according to standard.
composer require arslanimamutdinov/iso-standard-4217
- alpha3 - three-letter currency code e.g. RUB;
- numericCodes - numeric currency code e.g. 643;
- name - string currency name e.g. Russian ruble.
Currency - ISO 4217 standard model, contains properties:
- name - currency name;
- alpha3 - currency alpha3 code;
- numericCode - currency numeric code.
ISO4217 - abstract class provides set of static function for working with ISO 4217 standard.
ISO4217Utility - service class wrapper over ISO4217 (need instantiate class object).
Provides access to currency standard by alpha3-named static function.
For example:
// returns instance of Currency class
// includes currency data for United Arab Emirates dirham
ISO4217::AED();
Provides access to currency raw data.
For example:
ISO4217::getRawStandardsData();
Provides search standards by given currency alpha3 codes.
For example:
// returns Currency[]
ISO4217::getAllByAlpha3Codes(['AED', 'GBP']);
Provides search standards by given currency numeric codes.
For example:
// returns Currency[]
ISO4217::getAllByNumericCodes(['784', '826']);
Provides search standards by given currency alpha3 code.
For example:
// returns Currency or null if not found
ISO4217::getByAlpha3('AED');
Provides search standards by given currency numeric code.
For example:
// returns Currency or null if not found
ISO4217::getByNumericCode('784');
Provides access to all currency standards represented in array of Currency objects.
For example:
// returns Currency[]
ISO4217::getAll();
Provides all features from ISO4217 but with utility instance creation.
For example:
$currencyUtility = new ISO4217Utility();
$currencyUtility->AED();
Welcome to pull requests. If there is a major changes, first please open an issue for discussion.
Please make sure to update tests as appropriate.
- ISO 4217 by Wikipedia licensed under CC BY-SA 3.0 Unported License
- www.iso.org