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

Class: Services_ExchangeRates_Transport_HTTP_Cached

Source Location: /Services_ExchangeRates-0.8.0/Services/ExchangeRates/Transport/HTTP_Cached.php

Class Overview

A HTTP transport class, with caching.



  • Copyright 2009 Daniel O'Cconor



Inherited Variables

Inherited Methods

Class Details

[line 28]
A HTTP transport class, with caching.

[ Top ]

Class Variables

$cache =

[line 30]

Type:   mixed

[ Top ]

$request =

[line 31]

  • Access: protected

Type:   mixed

[ Top ]

Method Detail

__construct (Constructor)   [line 33]

Services_ExchangeRates_Transport_HTTP_Cached __construct( $cache, $request)

  • Access: public


Cache_Lite   $cache     
HTTP_Request2   $request     

[ Top ]

fetch   [line 50]

string fetch( string $url)

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


string   $url     URL of remote file to retrieve

[ Top ]

Documentation generated on Tue, 23 Oct 2012 22:30:04 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.