Pluf_Template Class Reference

List of all members.

Public Member Functions

 __construct ($template, $folders=null, $cache=null)
 render ($c=null)
 getCompiledTemplateName ()
 write ($name)

Static Public Member Functions

static markSafe ($string)

Public Attributes

 $tpl = ''
 $folders = array()
 $cache = ''
 $compiled_template = ''
 $template_content = ''
 $context = null
 $class = ''


Detailed Description

Render a template file.

Constructor & Destructor Documentation

Pluf_Template::__construct ( template,
folders = null,
cache = null 
)

Constructor.

If the folder name is not provided, it will default to Pluf::f('template_folders') If the cache folder name is not provided, it will default to Pluf::f('tmp_folder')

Parameters:
string Template name.
string Template folder paths (null)
string Cache folder name (null)


Member Function Documentation

Pluf_Template::render ( c = null  ) 

Render the template with the given context and return the content.

Parameters:
Object Context.

Pluf_Template::getCompiledTemplateName (  ) 

Get the full name of the compiled template.

Ends with .phps to prevent execution from outside if the cache folder is not secured but to still have the syntax higlightings by the tools for debugging.

Returns:
string Full path to the compiled template

Pluf_Template::write ( name  ) 

Write the compiled template in the cache folder. Throw an exception if it cannot write it.

Returns:
bool Success in writing

static Pluf_Template::markSafe ( string  )  [static]


Member Data Documentation

Pluf_Template::$tpl = ''

Pluf_Template::$folders = array()

Pluf_Template::$cache = ''

Pluf_Template::$compiled_template = ''

Pluf_Template::$template_content = ''

Pluf_Template::$context = null

Pluf_Template::$class = ''


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:52 2010 for Pluf by  doxygen