2017 © Pedro Peláez
 

library iso-currency

A PHP library providing ISO 4217 currencies. Work with currencies by the standard to avoid confusions.

image

fortis/iso-currency

A PHP library providing ISO 4217 currencies. Work with currencies by the standard to avoid confusions.

  • Thursday, July 26, 2018
  • by fortis
  • Repository
  • 1 Watchers
  • 1 Stars
  • 699 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 62 % Grown

The README.md

iso-currency

Travis Coveralls Packagist FOSSA Status, (*1)

Very simple and easy-to-use Currency class to work with ISO 4217 currencies as they provided by the official ISO Maintenance Agency, (*2)

What is ISO 4217

ISO 4217 is a standard published by the International Organization for Standardization, which delineates currency designators, country codes (alpha and numeric), and references to minor units in three tables., (*3)

-- Wikipedia, (*4)

Install

Install directly from command line using Composer ``` bash composer require fortis/iso-currency, (*5)


## Use Don't type currency codes as strings, instead it's better to use constants from auto generated CurrencyCode class as it's always up-to-date with currency-iso.org and helps you avoid typos. For example, use `CurrencyCode::USD` instead of `'USD'`. Autocomplete will make it easier. Also you can create new currency object with Currency class and autocomplete: `new Currency::USD()`. ``` php // Create Currency instance. $currency = new Currency(CurrencyCode::EUR); // constructor $currency = Currency::create(CurrencyCode::EUR); // static factory method $currency = Currency::EUR(); // short syntax with autocomplete on :: // Currency code validation. $currency = new Currency('EUE'); // throws InvalidCurrencyException // Check whether the given Currency is USD/EUR/etc. $currency = new Currency(CurrencyCode::EUR); $currency->is(Currency::EUR()); // true $currency->is(Currency::USD()); // false

License

iso-currency is licensed under the MIT license., (*6)

FOSSA Status, (*7)

Source(s)

The Versions

26/07 2018

dev-master

9999999-dev https://github.com/fortis/iso-currency

A PHP library providing ISO 4217 currencies. Work with currencies by the standard to avoid confusions.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Alan Bondarchuk

library currency money iso currencies iso 4217 4217 iso-currency

11/09 2017

1.0.1

1.0.1.0 https://github.com/fortis/iso-currency

A PHP library providing ISO 4217 currencies. Work with currencies by the standard to avoid confusions.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Alan Bondarchuk

library currency money iso currencies iso 4217 4217 iso-currency

10/09 2017

1.0.0

1.0.0.0 https://github.com/fortis/iso-currency

A PHP library providing ISO 4217 currencies. Work with currencies by the standard to avoid confusions.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Alan Bondarchuk

library currency money iso currencies iso 4217 4217 iso-currency