XTemplate PHP templating engine
Located in /xtemplate.class.php (line 25)
Class | Description |
---|---|
CachingXTemplate | CachingXTemplate Extension to XTemplate to provide block level and whole template caching facilities Needs Web server writable directory |
Unparsed blocks
Template block end delimiter
Template block end word
The last 3 properties and this make the delimiters look like:
Block parsing order for recursive parsing (Sometimes reverse :)
Template block start delimiter
Template block start word
Regular expression element for comments within tags and blocks
Debug mode
File caching during duration of script e.g. files only cached to speed {FILE "filename"} repeats
Raw contents of the template file
Template filename
Filenames lookup table
File variables array
RegEx for file include variable
"/\{FILE\s*\{([A-Za-z0-9\._]+?)\}\s*\}/m";
RegEx for file includes with newlines
"/^\s*\{FILE\s*\{([A-Za-z0-9\._]+?)\}\s*\}\s*\n/m";
Filevars' parent block
Default main template block name
Script output type
Parsed blocks
Preparsed blocks (for file includes)
Store sub-block names (For fast resetting)
Template tag end delimiter
This makes the delimiters look like:
Template tag start delimiter
This makes the delimiters look like:
Location of template files
Variables array
Auto-reset sub blocks
Errors
Set to FALSE to generate errors if a non-existant blocks is referenced
Null string for unassigned blocks
Null string for unassigned vars
PHP 4 Constructor - Instantiate the object
PHP 5 Constructor - Instantiate the object
parses a block for every set of data in the values array
assign a variable
assign a file variable
sets AUTORESET to 0. (default is 1) if set to 1, parse() automatically resets the parsed blocks' sub blocks (for multiple level blocks)
inserts a loop ( call assign & parse )
prints the parsed text
prints the parsed text to a specified file
parse a block
returns true if block was parsed, false if not
Restart the class - allows one instantiation with several files processed by restarting
e.g. $xtpl = new XTemplate('file1.xtpl'); $xtpl->parse('main'); $xtpl->out('main'); $xtpl->restart('file2.xtpl'); $xtpl->parse('main'); $xtpl->out('main'); (Added in response to sf:641407 feature request)
returns the parsed text for a block, including all sub-blocks.
Backwards compatibility only
Backwards compatibility only
setup - the elements that were previously in the constructor
sets AUTORESET to 1. (default is 1) if set to 1, parse() automatically resets the parsed blocks' sub blocks (for multiple level blocks)
sets the string to replace in case the block was not parsed
sets the string to replace in case the var was not assigned
returns the parsed text for a block
generates the array containing to-be-parsed stuff: $blocks["main"],$blocks["main.table"],$blocks["main.table.row"], etc.
also builds the reverse parse order.
recursively gets the content of a file with {FILE "filename.tpl"} directives
store container block's name for file variables
Documentation generated on Tue, 29 May 2007 19:29:36 +0100 by phpDocumentor 1.3.0RC3