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

Class: Services_ExchangeRates_Common

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

Class Overview


Common functions for data retrieval


Methods


Child classes:

Services_ExchangeRates_Rates_NBI
National Bank of Israel Currency Exchange Rates Driver
Services_ExchangeRates_Countries_UN
United Nations country codes driver
Services_ExchangeRates_Currencies_UN
United Nations Currency Codes Driver
Services_ExchangeRates_Rates_ECB
European Central Bank Exchange Rate Driver
Services_ExchangeRates_Rates_NBP
National Bank of Poland Exchange Rate Driver

Inherited Variables

Inherited Methods


Class Details

[line 41]
Common functions for data retrieval

Provides base functions to retrieve and cache data feeds in different formats.



[ Top ]


Method Detail

retrieveFile   [line 55]

string retrieveFile( string $url, int $cacheLength, $cacheDir)

Retrieves data from cache, if it's there. If it is, but it's expired,

it performs a conditional GET to see if the data is updated. If it isn't, it down updates the modification time of the cache file and returns the data. If the cache is not there, or the remote file has been modified, it is downloaded and cached.

  • Return: File contents

Parameters:

string   $url   —  URL of remote file to retrieve
int   $cacheLength   —  Length of time to cache file locally before asking the server if it changed.
   $cacheDir   — 

[ Top ]

retrieveXML   [line 104]

object XML_Tree retrieveXML( string $url, int $cacheLength, $cacheDir)

Downloads XML file or returns it from cache
  • Return: object

Parameters:

string   $url   —  URL of XML file
int   $cacheLength   —  Length of time to cache
   $cacheDir   — 

[ Top ]


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