Services_ExchangeRates
[ class tree: Services_ExchangeRates ] [ index: Services_ExchangeRates ] [ all elements ]

Class: Services_ExchangeRates_Rates_NBP

Source Location: /Services_ExchangeRates-0.5.3/ExchangeRates/Rates_NBP.php

Class Overview

Services_ExchangeRates_Common
   |
   --Services_ExchangeRates_Rates_NBP

National Bank of Poland Exchange Rate Driver


Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_ExchangeRates_Common

Services_ExchangeRates_Common::retrieveFile()
Retrieves data from cache, if it's there. If it is, but it's expired,
Services_ExchangeRates_Common::retrieveXML()
Downloads XML file or returns it from cache

Class Details

[line 52]
National Bank of Poland Exchange Rate Driver


[ Top ]


Class Variables

$feedDir =  'http://www.nbp.pl/Kursy/'

[line 70]

Directory in which the XML file is located

Type:   string


[ Top ]

$feedHTMLUrl =  'http://www.nbp.pl/Kursy/KursyA.html'

[line 64]

URL of HTML page where the XML feed URL is given

Type:   string


[ Top ]

$feedXMLUrl =

[line 58]

URL of XML feed

Type:   string


[ Top ]



Method Detail

retrieve   [line 87]

array retrieve( int $cacheLength, $cacheDir)

Downloads exchange rates in terms of the PLN from the National Bank of Poland (NBP). This information is updated daily, and is cached by default for 1 hour.

Returns a multi-dimensional array containing: 'rates' => associative array of currency codes to exchange rates 'source' => URL of feed 'date' => date feed last updated, pulled from the feed (more reliable than file mod time)


Parameters:

int   $cacheLength   —  Length of time to cache (in seconds)
   $cacheDir   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:04:17 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.