MIOLO25
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe MCachedTemplate
Diagrama de heranças da classe MCachedTemplate
MBTemplate

Membros públicos

 __construct ($path, $cache_id=null, $expire=900)
 
 is_cached ()
 
 fetch_cache ($file)
 
- Membros públicos herdados de MBTemplate
 __construct ($path=null)
 Path to the templates.
 
 set_path ($path)
 
 set ($name, $value)
 
 fetch ($file)
 
 execute ($file)
 

Campos de Dados

 $cache_id
 
 $expire
 
 $cached
 
- Campos de Dados herdados de MBTemplate
 $vars
 
 $path
 Holds all the template variables.
 

Descrição detalhada

An extension to Template that provides automatic caching of template contents.

Documentação dos Construtores & Destrutor

◆ __construct()

__construct ( $path,
$cache_id = null,
$expire = 900 )

Constructor.

Parâmetros
string$pathpath to template files
string$cache_idunique cache identifier
int$expirenumber of seconds the cache will live
Retorna
void

Documentação das funções

◆ fetch_cache()

fetch_cache ( $file)

This function returns a cached copy of a template (if it exists), otherwise, it parses it as normal and caches the content.

Parâmetros
$filestring the template file
Retorna
string

◆ is_cached()

is_cached ( )

Test to see whether the currently loaded cache_id has a valid corrosponding cache file.

Retorna
bool

Cache the results of this is_cached() call. Why? So we don't have to double the overhead for each template. If we didn't cache, it would be hitting the file system twice as much (file_exists() & filemtime() [twice each]).

Documentação dos campos e atributos

◆ $cache_id

$cache_id

◆ $cached

$cached

◆ $expire

$expire

A documentação para esta classe foi gerada a partir do seguinte ficheiro: