PhpTemplate Class Reference

Inheritance diagram for PhpTemplate:
Display CoreTemplate ModuleTemplate ClaroBanner ClaroBody ClaroFooter ClaroHeader

Public Member Functions

 __construct ($templatePath)
 assign ($name, $value)
 render ()
 showBlock ($blockName)
 hideBlock ($blockName)

Protected Attributes

 $_templatePath

Detailed Description

Simple PHP-based template class

Definition at line 23 of file phptemplate.lib.php.


Constructor & Destructor Documentation

__construct ( templatePath  ) 

Constructor

Parameters:
string $templatePath path to the php template file

Reimplemented in CoreTemplate.

Definition at line 31 of file phptemplate.lib.php.


Member Function Documentation

assign ( name,
value 
)

Assign a value to a variable

Parameters:
string $name
mixed $value

Definition at line 41 of file phptemplate.lib.php.

hideBlock ( blockName  ) 

Hide a block in the template given its name (ie set the variable with the block name to false)

Parameters:
string $blockName

Definition at line 84 of file phptemplate.lib.php.

render (  ) 

Render the template

Returns:
string
Exceptions:
Exception if file not found or error/exception in the template

Implements Display.

Reimplemented in ClaroBanner, ClaroBody, ClaroFooter, and ClaroHeader.

Definition at line 51 of file phptemplate.lib.php.

showBlock ( blockName  ) 

Show a block in the template given its name (ie set the variable with the block name to true)

Parameters:
string $blockName

Definition at line 74 of file phptemplate.lib.php.


Field Documentation

$_templatePath [protected]

Definition at line 25 of file phptemplate.lib.php.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 12:28:40 2010 for Claroline API by  doxygen 1.6.3