[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/pear/PEAR/ -> REST.php (sommaire)

PEAR_REST PHP versions 4 and 5

Author: Greg Beaver <cellog@php.net>
Copyright: 1997-2006 The PHP Group
License: http://www.php.net/license/3_0.txt PHP License 3.0
Version: CVS: $Id: REST.php,v 1.20 2006/03/02 03:09:31 pajoye Exp $
Poids: 397 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

PEAR_REST:: (8 méthodes):
  PEAR_REST()
  retrieveCacheFirst()
  retrieveData()
  useLocalCache()
  getCacheId()
  getCache()
  saveCache()
  downloadHttp()


Classe: PEAR_REST  - X-Ref

Intelligently retrieve data, following hyperlinks if necessary, and re-directing
as well

PEAR_REST(&$config, $options = array()   X-Ref
Pas de description

retrieveCacheFirst($url, $accept = false, $forcestring = false)   X-Ref
Retrieve REST data, but always retrieve the local cache if it is available.

This is useful for elements that should never change, such as information on a particular
release
param: string full URL to this resource
param: array|false contents of the accept-encoding header
param: boolean     if true, xml will be returned as a string, otherwise, xml will be
return: string|array

retrieveData($url, $accept = false, $forcestring = false)   X-Ref
Retrieve a remote REST resource

param: string full URL to this resource
param: array|false contents of the accept-encoding header
param: boolean     if true, xml will be returned as a string, otherwise, xml will be
return: string|array

useLocalCache($url, $cacheid = null)   X-Ref
Pas de description

getCacheId($url)   X-Ref
Pas de description

getCache($url)   X-Ref
Pas de description

saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid = null)   X-Ref

param: string full URL to REST resource
param: string original contents of the REST resource
param: array  HTTP Last-Modified and ETag headers
param: bool   if true, then the cache id file should be regenerated to

downloadHttp($url, $lastmodified = null, $accept = false)   X-Ref
Efficiently Download a file through HTTP.  Returns downloaded file as a string in-memory
This is best used for small files

If an HTTP proxy has been configured (http_proxy PEAR_Config
setting), the proxy will be used.

param: string  $url       the URL to download
param: string  $save_dir  directory to save file in
param: false|string|array $lastmodified header values to check against for caching
param: false|array $accept Accept headers to send
return: string|array  Returns the contents of the downloaded file or a PEAR



Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics