TIP_Template_Engine

Introduction

Base class for template engines

Source file
/Type/template_engine.php
Extends
TIP_Type
abstract
yes

Provides a common interface to run template files.

Properties

extension : string

The extension to append to the template files

access
protected

template_root : string

The template root path

access
protected

fallback_root : string

The template fallback path

access
protected

cache_root : array

The cache root

access
protected

compiled_root : array

The compiled root

access
protected

caching : boolean

Is the caching feature enabled or not?

access
protected

compiling : boolean

Is the compiling feature enabled or not?

access
protected

Methods

checkOptions (&$options)

&$options
lines
77 - 91
static
yes
access
protected

__construct ($options)

$options
lines
93 - 96
access
protected

runBuffer (&$template, &$caller) : bool|string

Parse and execute a template buffer

&$template
TIP_Template
The template instance
&$caller
TIP_Module
The caller module
lines
109 - 109
abstract
yes
access
public

compileBuffer (&$template) : string|null

Compile a template buffer

&$template
TIP_Template
The template instance
lines
116 - 116
abstract
yes
access
public

run (&$template, &$caller) : bool

Execute a template file

&$template
TIP_Template
The template to run
&$caller
TIP_Module
The caller module
lines
130 - 191
access
public

Parses and executes a template.

getTemplatePath (&$path) : array|null

Get the path nodes to a template file

&$path
array|string
The path nodes to analyze
lines
207 - 230
access
public

Check for the template file identified by path in the 'template_root' directory. If the template does not exist, try to get it from 'fallback_root'. The "extension" property, if defined by the template engine, is used to build the file name.

Return the path as an array of nodes (directory and file names), so it can be easily used to build both paths and URIs.

buildCachePath (&$template) : string|null

Get the path to the cache file without checking for file existence

&$template
TIP_Template
The template to build
lines
237 - 240
access
public

getCachePath (&$template) : string|null

Get the path to the cache file, if it exists

&$template
TIP_Template
The template to check
lines
247 - 251
access
public

getCacheUri (&$template) : string|null

Get the relative URI of the cached file, if it exists

&$template
TIP_Template
The template to check
lines
258 - 265
access
public
TIP_Template_Engine was last modified by TiP on Mon 25 May 2009 06:22:25 PM CEST
Hosted by BerliOS Developer Logo