[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/template/ -> cachedtemplate.class.php (sommaire)

(pas de description)

Poids: 99 lignes (3 kb)
Inclus ou requis:0 fois
Référencé: 1 fois
Nécessite: 0 fichiers

Définit 1 class

CachedTemplate:: (6 méthodes):
  CachedTemplate()
  fetch()
  isCached()
  clearCache()
  display()
  getCreationTimestamp()


Classe: CachedTemplate  - X-Ref

\ingroup Template

Extends the Template class to provide support for cached templated. This class adds
two additional methods that are not available in Template:

- CachedTemplate::isCached() to know whether the current CachedTemplate is working on cached contents
- CachedTemplate::clearCache() to clear the current cached contents of this template
- CachedTemplate::getCreationTimestamp() to determine when the current cached version was created

CachedTemplate( $templateFile, $cacheLifetime = 300 )   X-Ref
Constructor.

param: cacheLifeTime How many seconds we would like to cache the template

fetch( $cacheId )   X-Ref
Renders the template and returns the contents as an string

return: The result as an string

isCached( $cacheId )   X-Ref
returns wether this template is cached or not

param: cacheId The cache identifier
return: true if the template is cached or false otherwise

clearCache( $cacheId )   X-Ref
clears the cache whose id is $cacheId

param: cacheId The id of the cache that we'd like to clear
return: nothing

display( $cacheId )   X-Ref
Displays the result of rendering the template

return: Always true

getCreationTimestamp()   X-Ref
returns the date when this template was created

param: the UNIX timestamp when this template was created



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics