PHPTemplateA PHP-based template class inspired by the example at http://www.sitepoint.com- /print- /beyond-template-engine The idea is to simplify the template engine by just using regular old PHP source files as template files. Since the syntax for advanced templating is not significantly less complicated than regular PHP syntax, we might as well save ourselves some trouble and just use PHP. Please note that this class will depend on an appropriately set include_path. This will allow us to transparently have different templates for different sections of the site and fall back to the default if we don’t want to bother. IhneritsSummary
process
Process the template and get the output. Parameters
ReturnsA string containing the output if return_results is true. Otherwise, it returns true on success and false on failure. |
Sets a template variable.
function set( $var, $val = true )
Unsets a previously set template variable.
function unsetVar( $var )
Determine if a template variable has been set.
function varSet( $var )
Resets a template back to its empty state, clearing all variables and the file.
function reset( $file = "" )
Process the template and get the output.
function process( $return_results = true )