Template Class Reference

List of all members.

Public Member Functions

 Template ($module_name='')
 set_module ($name)
import_helper ($name)
 set ($name, $value)
get ($name)
 is_set ($name)
 un_set ($name)
 fetch ($filename, $vars=array(), $language=false)

Public Attributes

 $variables
 $module_name

Detailed Description

PRONTO WEB FRAMEWORK Copyright (C) 2006, Judd Vinet

Author:
Judd Vinet <jvinet@zeroflux.org>

Description: Template facilities.

Definition at line 10 of file template.php.


Member Function Documentation

Template::fetch ( filename,
vars = array(),
language = false 
)

Return a rendered template.

Parameters:
string $filename Template file to render
array $vars Additional variables to include in template
string $language I18N language to set before rendering template
Returns:
string Rendered template

Definition at line 121 of file template.php.

References $GLOBALS, $i18n, $old, DS, and get().

& Template::get ( name  ) 

Retrieve a variable that will be passed to the template

Parameters:
string $name
Returns:
mixed

Definition at line 87 of file template.php.

Referenced by fetch().

& Template::import_helper ( name  ) 

Import a helper (aka "template plugin").

Parameters:
string $name Helper name

Definition at line 49 of file template.php.

References Factory::plugin().

Referenced by Template().

Template::is_set ( name  ) 

Check if a template variable has been set

Parameters:
string $name
Returns:
bool

Definition at line 98 of file template.php.

Template::set ( name,
value 
)

Set a variable to be passed to the template

Parameters:
mixed $name
mixed $value

Definition at line 67 of file template.php.

Template::set_module ( name  ) 

Declare this template object to be part of a Pronto module.

Parameters:
string $name Module name

Definition at line 39 of file template.php.

Template::Template ( module_name = ''  ) 

Constructor.

Parameters:
string $module_name If the template object is working within a Pronto module, then set the name here. This will affect the path that the template object uses to find template files.

Definition at line 23 of file template.php.

References $module_name, $p, and import_helper().

Template::un_set ( name  ) 

Unset/Delete a template variable that has been set

Parameters:
string $name

Definition at line 108 of file template.php.


Member Data Documentation

Template::$module_name

Definition at line 13 of file template.php.

Referenced by Template().

Template::$variables

Definition at line 12 of file template.php.


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

Generated on Wed Jan 13 09:21:05 2010 for Pronto Framework by  doxygen 1.6.1