User Tools

Site Tools


php:xmlcurrency

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

php:xmlcurrency [2013/03/16 17:40] (current)
Line 1: Line 1:
 +==== XML Currency Class ====
 +ver 1.0 26 Oct 2008
  
 +This class implements support for xml currencies files, usually provided by central banks. It's a general class, who must be extended with particulary classes (e.g. BNR_reader.class),​ fitting your needs.
 +
 +There is a sub-class that extends the base class to retrieve currency data specifically from XML files provided by the National Bank of Romania.
 +
 +<code php>
 +abstract class XML_currency
 +</​code>​
 +
 +Variables:
 +
 +<code php>
 +    abstract protected function parse_rate_contents($content,​ $currency = '​EUR'​);​
 +    abstract protected function parse_domdoc();​
 +    protected $xmlpath
 +    protected $allow_url_fopen;​
 +    protected $xml_content;​
 +    protected $domdoc
 +</​code>​
 +
 +Methods:
 +<code php>
 +    public function __construct()
 +    public function parse_xml()
 +    protected function get_xml_content()
 +    protected function DOMconnector()
 +</​code>​
 +
 +
 +class BNR_reader extends XML_currency
 +
 +
 +Variables:
 +
 +<code php>
 +    inherited ones
 +    protected $xmlpathl => here the URL for xml file
 +</​code>​
 +
 +
 +Methods:
 +
 +<code php>
 +    inherited ones
 +    public function parse_rate_contents($content,​ $currency = '​EUR'​)
 +    public function parse_domdoc()
 +</​code>​
 +
 +
 +**REQUIREMENTS:​**
 +
 +- at least PHP 5.0 \\ 
 +- allow_url_fopen = 1 in php.ini OR curl extension installed
 +
 +
 +Download latest version of **XML Currency Class** package (1.00) {{:​php:​bnr_cursvalutar.tar.gz| here}}
 +
 +Documentation in phpdoc format {{:​php:​documentation_bnr_cursvalutar.tar.bz2| here}}
 +
 +
 +//I'm always glad to hear your impressions,​ requests or bug reports at the indicated email on this site.//
php/xmlcurrency.txt ยท Last modified: 2013/03/16 17:40 (external edit)