TITAN Library for PHP5  5.6.0
Web Software Development Kit for PHP5
template Class Reference

Titan Template Management Class. More...

Public Member Functions

 __construct ($template_path= '')
 
 render ($template_file)
 
 display ($template_file)
 
 __set ($property, $value)
 
 __get ($property)
 
 set_block ($name, $content)
 
 get_block ($name, $default= '')
 

Detailed Description

Titan Template Management Class.

Class: \tl\output\template

Author
James E. Bush work@.nosp@m.bush.nosp@m..cc
Version
5.6.0

Constructor & Destructor Documentation

__construct (   $template_path = '')

Constructor

Parameters
string$template_pathThe path to the template files

Member Function Documentation

render (   $template_file)

Parse and render a template file, return the result

Parameters
string$template_fileThe template file to parse and render
Returns
string The rendered contents
display (   $template_file)

Parse and render a template file, output the result

Parameters
string$template_fileThe template file to parse, render, and output
__set (   $property,
  $value 
)

Magic Method: Set the value of a template property

Parameters
string$propertyThe template property to set
string$valueThe value of the template property
__get (   $property)

Magic Method: Get the value of a template property

Parameters
string$propertyThe template property to get
Returns
mixed The value of the template property, or NULL if not set
set_block (   $name,
  $content 
)

Save a reusable block of template content

Parameters
string$nameThe name of the block to save
string$contentThe content to save
get_block (   $name,
  $default = '' 
)

Retrieve a reusable block of template content

Parameters
string$nameThe name of the block to retrieve
string$default(optional) Default content to use if the block isn't saved (default) ''
Returns
string The saved content

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