fititnt - Especialista e Desenvolvedor Joomla! Visit fititnt.org, and look for some extension or more Joomla Framework info php_text_cache
[ class tree: php_text_cache ] [ index: php_text_cache ] [ all elements ]

Class: php_text_cache

Source Location: /libraries/domit/php_text_cache.php

Class php_text_cache

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From php_http_connector

php_http_connector::$httpConnection

Inherited From php_http_connector

php_http_connector::setAuthorization()
Specifies basic authentication for an http connection
php_http_connector::setConnection()
Specifies the parameters of the http conection used to obtain the xml data
php_http_connector::setProxyAuthorization()
Specifies basic authentication for the proxy
php_http_connector::setProxyConnection()
Specifies that a proxy is to be used to obtain the data

[ Top ]
Property Summary
string   $cacheDir  
int   $cacheTime  
boolean   $doUseHTTPClient  
int   $httpTimeout  

[ Top ]
Method Summary
php_text_cache   php_text_cache()   Constructor
void   establishConnection()   Establishes a connection, given an url
string   fromCache()   Get text from cache file
string   fromFile()   Get text from an url or file
string   fromURL()   Gets data from an url and caches a copy of the data
string   getCacheFileName()   Given an url, returns the path to the cache file
string   getData()   Gets data from an url, or its cache file
void   setTimeout()   Specifies the default timeout value for connecting to a host
void   useHTTPClient()   Specifies whether an HTTP client should be used to establish a connection

[ Top ]
Properties
string   $cacheDir [line 27]

[ Top ]
int   $cacheTime [line 29]

[ Top ]
boolean   $doUseHTTPClient [line 31]

[ Top ]
int   $httpTimeout [line 33]

[ Top ]
Methods
Constructor php_text_cache  [line 41]

  php_text_cache php_text_cache( [string $cacheDir = './'], [int $cacheTime = -1], [int $timeout = 0]  )

Constructor

Parameters:
string   $cacheDir:  Directory in which to store the cache files
int   $cacheTime:  Expiry time for cache file (-1 signifies no expiry limit)
int   $timeout:  Time in seconds to disconnect after attempting an http connection


[ Top ]
establishConnection  [line 98]

  void establishConnection( string $url  )

Establishes a connection, given an url

Parameters:
string   $url:  The url of the data


[ Top ]
fromCache  [line 169]

  string fromCache( string $cacheFile  )

Get text from cache file

Parameters:
string   $cacheFile:  The file path

API Tags:
Return:  The text contained in the file, or an empty string


[ Top ]
fromFile  [line 178]

  string fromFile( string $filename  )

Get text from an url or file

Parameters:
string   $filename:  The url or file path

API Tags:
Return:  The text contained in the url or file, or an empty string


[ Top ]
fromURL  [line 123]

  string fromURL( string $url, string $cacheFile  )

Gets data from an url and caches a copy of the data

Parameters:
string   $url:  The url for the data
string   $cacheFile:  The cache file path

API Tags:
Return:  The contents of the url


[ Top ]
getCacheFileName  [line 90]

  string getCacheFileName( string $url  )

Given an url, returns the path to the cache file

Uses an md5 hash of the url. This can be overridden if a different approach is required

Parameters:
string   $url:  The url of the data

API Tags:
Return:  The cache file name


[ Top ]
getData  [line 61]

  string getData( string $url  )

Gets data from an url, or its cache file

Parameters:
string   $url:  The url of the data

API Tags:
Return:  The data at the specified url


[ Top ]
setTimeout  [line 51]

  void setTimeout( int $timeout  )

Specifies the default timeout value for connecting to a host

Parameters:
int   $timeout:  The number of seconds to timeout when attempting to connect to a server


[ Top ]
useHTTPClient  [line 111]

  void useHTTPClient( boolean $truthVal  )

Specifies whether an HTTP client should be used to establish a connection

Parameters:
boolean   $truthVal:  True if an HTTP client is to be used to establish the connection


[ Top ]

The site fititnt.org is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. If you are looking for official documentation, visit api.joomla.org and docs.joomla.org.
Documentation generated on Mon, 26 Oct 2009 22:16:16 -0200 by phpDocumentor 1.4.3