Download the PHP package gnahotelsolutions/currency-converter without Composer
On this page you can find all versions of the php package gnahotelsolutions/currency-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gnahotelsolutions/currency-converter
More information about gnahotelsolutions/currency-converter
Files in gnahotelsolutions/currency-converter
Package currency-converter
Short Description Convert price amounts between currencies
License MIT
Homepage https://github.com/gnahotelsolutions/currency-converter
Informations about the package currency-converter
Convert price amounts between currencies
Use this package to convert prices from one currency to another by the exchange rate using a base currency.
Installation
You can install the package via composer:
Usage
Before anything, you need to create a repository of currencies to be loaded into the Converter
.
A currency needs a name
, exchange rate
and decimals
to be shown after the conversion.
When declaring a Converter
, you'll also have to tell what's your base currency from where the exchange rates are calculated.
Once your Converter
is ready, you can transform a Price
using the fluent interface. The result will be a new Price
instance with the converted amount and the desired currency
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- GNA Hotel Solutions
- All Contributors
License
The MIT License (MIT). Please see License File for more information.