Class IMP_Template

Description

Located in /lib/Template.php (line 32)


	
			
Variable Summary
 array $_arrays
 string $_basepath
 Horde_Cache $_cache
 array $_foreachMap
 integer $_foreachVar
 array $_options
 array $_pregcache
 array $_scalars
 string $_template
Method Summary
 IMP_Template IMP_Template ([string $basepath = null])
 string fetch ([string $filename = null])
 mixed get (string $tag)
 mixed getOption (string $option)
 string parse ([string $contents = null])
 void set (string|array $tag, mixed $var)
 void setOption (string $option, mixed $val)
 void setTemplate (string $template)
 void _parse ()
Variables
array $_arrays = array() (line 67)

Loop tag values.

string $_basepath = '' (line 53)

Directory that templates should be read from.

Horde_Cache $_cache (line 39)

The Horde_Cache object to use.

array $_foreachMap = array() (line 88)

Foreach variable mappings.

integer $_foreachVar = 0 (line 95)

Foreach variable incrementor.

array $_options = array() (line 46)

Option values.

array $_pregcache = array() (line 102)

preg_match() cache.

array $_scalars = array() (line 60)

Tag (scalar) values.

string $_template = null (line 81)

Template source.

string $_templateFile = null (line 74)

Path to template source.

Methods
Constructor IMP_Template (line 109)

Constructor.

IMP_Template IMP_Template ([string $basepath = null])
  • string $basepath: The directory where templates are read from.
fetch (line 206)

Fetches a template from the specified file and return the parsed contents.

  • return: The parsed template.
string fetch ([string $filename = null])
  • string $filename: The file to fetch the template from.
get (line 187)

Returns the value of a tag or loop.

  • return: The tag value or null if the tag hasn't been set yet.
mixed get (string $tag)
  • string $tag: The tag name.
getOption (line 155)

Returns an option's value.

  • return: The option's value.
mixed getOption (string $option)
  • string $option: The option name.
parse (line 252)

Parses all variables/tags in the template.

  • return: The parsed template.
string parse ([string $contents = null])
  • string $contents: The unparsed template.
set (line 167)

Sets a tag, loop, or if variable.

void set (string|array $tag, mixed $var)
  • string|array $tag: Either the tag name or a hash with tag names as keys and tag values as values.
  • mixed $var: The value to replace the tag with.
setOption (line 131)

Sets an option.

Currently available options are:

void setOption (string $option, mixed $val)
  • string $option: The option name.
  • mixed $val: The option's value.
setTemplate (line 141)

Set the template contents to a string.

void setTemplate (string $template)
  • string $template: The template text.
_parse (line 267)

Parses all variables/tags in the template.

void _parse ()

Documentation generated on Sun, 30 Jan 2011 05:28:18 +0000 by phpDocumentor 1.4.3