PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_Sigma

An implementation of Integrated Templates API with template 'compilation' added

Download latest release 1.4.0 (there might be newer Composer installable version)

License: PHP License

Description

HTML_Template_Sigma implements Integrated Templates API designed by Ulf Wendel.

Features:
* Nested blocks. Nesting is controlled by the engine.
* Ability to include files from within template: <!-- INCLUDE -->
* Automatic removal of empty blocks and unknown variables (methods to manually tweak/override this are also available)
* Methods for runtime addition and replacement of blocks in templates
* Ability to insert simple function calls into templates: func_uppercase('Hello world!') and to define callback functions for these
* 'Compiled' templates: the engine has to parse a template file using regular expressions to find all the blocks and variable placeholders. This is a very "expensive" operation and is an overkill to do on every page request: templates seldom change on production websites. Thus this feature: an internal representation of the template structure is saved into a file and this file gets loaded instead of the source one on subsequent requests (unless the source changes)
* PHPUnit-based tests to define correct behaviour
* Usage examples for most of the features are available, look in the docs/ directory

Documentation

Manual

Maintainers

Dependencies

Required

Releases

Bugs

IDStatusTypeVersionDateSummary
#818BogusBug2004-02-21No parsing with replaceBlockFile()
#876ClosedBug2004-02-26PEAR QA: improvement for get_class()-usage
#939BogusBug2004-03-03Wrong replacement for omit variables
#1489BogusBug2004-05-24text enclosed in {} vanishes
#1653Wont fixReq2004-06-16Callbacks in blocks with remove unknown
#1840ClosedBug2004-07-10stripslashes needed in _buildFunctionlist()
#2604BogusReq2004-10-24looped blocks
#2620Wont fixReq2004-10-26HTML_Template_Sigma::get(), additional param
#4896ClosedBug2005-07-23Error if template file is empty
#5012ClosedBug2005-08-05Change of openingDelimiter and closingDelimiter
#5168ClosedBug2005-08-21Functions inside includes sometimes get »forgotten«
#5359BogusBug2005-09-11replaceBlockfile produces error
#6204BogusBug2005-12-09php5 and Special Characters
#6346ClosedBug2005-12-24Typo in Line 1711
#6824BogusBug1.1.42006-02-17cache functionality strips mulitple linefeeds
#6902ClosedBug1.1.42006-02-23Problem w/ cache filename on Windows
#6905ClosedBug1.1.42006-02-23_getCache() function return false
#6908Wont fixBug1.1.42006-02-23variable value NULL & callback function
#6958Wont fixReq1.1.42006-02-28Miss error message with call of loadTemplateFile(' ')
#8219SuspendedReqCVS2006-07-14Remove line breaks after block tags
#8669BogusBug1.1.52006-09-10Sets variable required to show a block
#10566BogusReq1.1.52007-03-30Change trim_on_save behaviour
#12221ClosedReq1.1.62007-10-11template comments, a new option 'charset' and 2 new buildin functions
#13379ClosedDoc1.1.62008-03-12INCLUDE directive ignored when using setTemplate
#14691ClosedDoc2008-09-22User note that is a documentation problem
#18147ClosedDoc1.2.02010-12-27Wrong regex in variablenameRegExp
#19220ClosedBug1.2.02012-01-13Empty cache files are not ignored
#20068ClosedBug1.2.02013-09-19Deprecated: preg_replace()
#20967ClosedReq1.3.02015-10-16use __construct() constructor
#23751ClosedReq1.3.02018-05-21Provide valid constructor for HTML_Template_Sigma