dev-master
9999999-devCurrency Conversion for the Money package
BSD-3-Clause
The Requires
by Ivan Kerin
Wallogit.com
2017 © Pedro Peláez
Currency Conversion for the Money package
Currency Conversion for the Money package, (*2)
Convert £100 to corresponding € amount, based on the daily rate of the European Central Bank, (*3)
use CL\CurrencyConvert\Converter;
use CL\FileCache\ItemPool;
use SebastianBergmann\Money\GBP;
use SebastianBergmann\Money\Currency;
Converter::initialize(new ECBSource(new ItemPool()));
$hundred_pounds = new GBP(10000);
$converted = Converter::get()->convert($hundred_pounds, new Currency('EUR'));
You have to initialize the converter with a source object - default is ECBSource. It also requires a cache pool object (based on PSR Cache), (*4)
Copyright (c) 2014, Clippings Ltd. Developed by Ivan Kerin, (*5)
Under BSD-3-Clause license, read LICENSE file., (*6)
Currency Conversion for the Money package
BSD-3-Clause