Property | Type | Description | |
---|---|---|---|
$_arrays | array | Loop tag values. | |
$_basepath | string | Directory that templates should be read from. | |
$_cache | Horde_Cache | The Horde_Cache object to use. | |
$_foreachMap | array | Foreach variable mappings. | |
$_foreachVar | integer | Foreach variable incrementor. | |
$_logger | Horde_Log_Logger | Logger. | |
$_options | array | Option values. | |
$_pregcache | array | preg_match() cache. | |
$_scalars | array | Tag (scalar) values. | |
$_template | string | Template source. | |
$_templateFile | string | Path to template source. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
fetch ( string $filename = null ) : string | Fetches a template from the specified file and return the parsed contents. | |
get ( string $tag ) : mixed | Returns the value of a tag or loop. | |
getOption ( string $option ) : mixed | Returns an option's value. | |
parse ( string $contents = null ) : string | Parses all variables/tags in the template. | |
set ( string | array $tag, mixed $var ) | Sets a tag, loop, or if variable. | |
setOption ( string $option, mixed $val ) | Sets an option. | |
setTemplate ( string $template ) | Set the template contents to a string. |
Method | Description | |
---|---|---|
_doReplace ( $replace ) | TODO | |
_doSearch ( $tag, $key, $noclose = false ) | TODO | |
_generatePHPVar ( $tag, $key ) | Output the correct PHP variable string for use in template space. | |
_parse ( ) | Parses all variables/tags in the template. | |
_parseAssociativeTags ( ) |
Parse associative tags (i.e. |
|
_parseGettext ( ) | Parses gettext tags. | |
_parseIf ( string $key = null ) | Parses 'if' statements. | |
_parseLoop ( string $key = null ) | Parses the given array for any loops or other uses of the array. | |
_parseTags ( string $key = null ) | Replaces 'tag' tags with their PHP equivalents. |
public __construct ( array $params = [] ) | ||
$params | array | The following configuration options:
'basepath' - (string) The directory where templates are read from. 'cacheob' - (Horde_Cache) A caching object used to cache the output. 'logger' - (Horde_Log_Logger) A logger object. |
protected _generatePHPVar ( $tag, $key ) |
protected _parseAssociativeTags ( ) |
protected _parseLoop ( string $key = null ) | ||
$key | string | The key prefix to parse. |
protected _parseTags ( string $key = null ) | ||
$key | string | The key prefix to parse. |
'debug' - Output debugging information to screen 'forcecompile' - Force a compilation on every page load 'gettext' - Activate gettext detection
public setTemplate ( string $template ) | ||
$template | string | The template text. |
protected string $_basepath | ||
return | string |
protected Horde_Cache $_cache | ||
return | Horde_Cache |
protected array $_foreachMap | ||
return | array |
protected int $_foreachVar | ||
return | integer |
protected string $_templateFile | ||
return | string |