Services_ExchangeRates
[ 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.


Author(s):

Copyright:

  • Copyright 2009 Daniel O'Cconor

Variables

Methods


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_Lite $cache, HTTP_Request2 $request)

  • Access: public

Parameters:

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

Parameters:

string   $url   —  URL of remote file to retrieve

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:51:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.