Since one of the project’s I’ll be working on in a few months requires using up to date Exchange Rates (without the benefit of having a paid-for Bloomberg/IDC/Other terminal available) I did a quick check on what PHP classes are available for the purpose. There’s really not a whole lot out there. There’s a PEAR class along the lines I need, but it’s released under the PHP License and, not to be too argumentative, I prefer non-PEAR solutions where the end-user may have no access to update PEAR.
So since the project is planned to use the Zend Framework, I shot off a mail to the Framework’s fw-general mailing list to see if it would be a worthwhile contribution. As blind luck would have it, someone else had just then finished opening a proposal for a Zend_Service_Currency addition (the text has yet to be added). André Hoffmann (the guy who jumped first) was open to collaboration, so I’ve leaped on board as a second set of hands and eyes.
For those remotely interested, the draft proposal I forwarded to the mailing list as a discussion point (mainly for André) can be viewed from: http://www.zend.com/lists/fw-general/200609/msg00549.html. The basic premise is simple – the class will be capable of fetching exchange rates between any two currencies from a selection of sources. For the moment that means the European Central Bank and US Federal Reserve. Other sources will get added eventually, and the ability to add more supported by subclassing either as part of ZF or by addition by individual developers.
Eventual functionality includes spot fx rates, currency conversion, and fx rate list fetching from the selected source. It will likely use the proposed Zend_Currency class to handle locale issues (the usual comma vs period debate between Euopean mainlanders and the UK/US folk) and ensure currency codes are ISO 4217 compliant. Zend_Cache will be used to cache fetched data for a set period of time.
All I need now if for some higher power to review the CLA I forwarded back when and clear me as a contributor!

Related posts:

  1. Zend Framework 0.1.4 Preview Release!