Download the PHP package steffenbrand/curr-curr without Composer
On this page you can find all versions of the php package steffenbrand/curr-curr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Short Description Delivers current exchange rates for EUR provided by the ECB as PHP objects.
All versions of curr-curr with dependencies
Informations about the package curr-curr
CurrCurr - Current Currency (Exchange Rates)
Delivers current exchange rates for EUR provided by the ECB under https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml as PHP objects.
How to install
How to use
Request exchange rate for specific currency
Request all available exchange rates
Using PSR-16 SimpleCache
CurrCurr does not provide its own SimpleCache implementation, however it does give you the possibility to inject any PSR-16 compliant implementation into the EcbClient. You just have to wrap it with a CacheConfig instance.
You can provide your own key and time to live.
Mocking webservice response for Unit Testing your own project
CurrCurr allows you to inject your own implementation of the EcbClientInterface. But you can also use the provided EcbClientMock, which allows you to simulate 3 different responses.