Class Gollem_Template

Description

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


	
			
Variable Summary
 array $_arrays
 string $_basepath
 Horde_Cache $_cache
 array $_foreachMap
 integer $_foreachVar
 array $_options
 array $_pregcache
 array $_scalars
 string $_template
Method Summary
 Gollem_Template Gollem_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 66)

Loop tag values.

string $_basepath = '' (line 52)

Directory that templates should be read from.

Horde_Cache $_cache (line 38)

The Horde_Cache object to use.

array $_foreachMap = array() (line 87)

Foreach variable mappings.

integer $_foreachVar = 0 (line 94)

Foreach variable incrementor.

array $_options = array() (line 45)

Option values.

array $_pregcache = array() (line 101)

preg_match() cache.

array $_scalars = array() (line 59)

Tag (scalar) values.

string $_template = null (line 80)

Template source.

string $_templateFile = null (line 73)

Path to template source.

Methods
Constructor Gollem_Template (line 108)

Constructor.

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

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 191)

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 159)

Returns an option's value.

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

Parses all variables/tags in the template.

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

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 135)

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 145)

Set the template contents to a string.

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

Parses all variables/tags in the template.

void _parse ()

Documentation generated on Sun, 30 Jan 2011 05:24:45 +0000 by phpDocumentor 1.4.3