patTemplate pear.php-tools.net Powerful template engine. patTemplate is a powerful, non-compiling templating engine, that uses XML tags to divide a document into different parts. It provides different template types to emulate if/else and switch/case constructs, variable modifiers, input- and output filters and several more useful features. Stephan Schmidt schst schst@php-tools.net yes Andrew Eddie eddieajau argh@php-tools.net yes gERD Schaufelberger gerd gerd@php-tools.net yes Sebastian Mordziol gerd argh@php-tools.net yes 2007-06-13 3.2.0a2 3.2.0 alpha stable LGPL Changes since 3.1.x: - added __onchange condition (schst) - template functions support both, runtime and on-read-time processing - use placeholders in template function's attributes 4.2.0 1.4.0 patError pear.php-tools.net 1.1.0 patBBCode pear.php-tools.net XML_XUL pear.php.net 0.0.1 Text_Highlighter pear.php.net 3.1.0b1 3.1.0 beta stable 2006-08-20 LGPL Changes since 3.0.x: - allowed more than one namespace - added defaultFunction option, to define a function that is called for unknown functions - added new built-in condition __single - allow quoting variables using {FOO\} - implemented autoload in Call function - added new system variable: {PAT_ROW_TYPE} = odd|even - added "rowOffset" attribute that determines the starting point of PAT_ROW_VAR - allow usage of $self in the return values of the expression modifier (by Andrew Eddie of Mambo) - added "relative" attribute to load templates relative to the current template (request #89) - the varscope attribute now supports a list of templates - in the requiredvars attribute of a simple condition template it is now possible to specify the exact value of a variable via requiredvars="var=value" (request #93) - added clearVar(), clearVars(), clearGlobalVar() and clearGlobalVars() (request #91) - added fourth parameter to addObject() to hide private properties - addObject() now checks, whether an object implements a getVars() method - added experimental XUL dump using PEAR::XML_XUL (needs a lot of love) - added TemplateCaches for MMCache and eAccelerator (contributed by Mike Valstar) - added placeholderExists() method (request #100) - added Truncate Modifier (contributed by Rafa Couto) - StripComments Input Filter now also strips Javascript multiline comments (Tim-Patrick M�rk) - Allow output filters for single templates (using the OutputFilter="..." attribute and applyOutputFilter()) (Request #114) - Add default variable modifiers for a template (Request #92) - Added OutputFilter to highlight PHP code - File Reader: Allow array containing several root directories as template root Changes since 3.1.0a1: - Allow the use of a variable in conditions (<pat:sub condition="{FOO}"/>) - Added new custom function Highlight that is able to apply syntax highlighting to your code (requires PEAR::Text_Highlighter) - Added new custom function Img to create HTML images (contributed by Jens Strobel) - Fixed notice in File reader (argh) - Added parameter for TemplateCache_File to set the filemode (request #127) - Added InputFilter that allows you to use the short variable modifier syntax of Smarty (schst, Axel Stettner) (request #136) - Fixed bug with condition __empty that was used instead of condition 0 (bug #132) - Fixed bug in Dateformat modifier - Fixed bug with condition templates that have __single and __empty defined (bug #138) - Bugfixes and new features in Translate function (bugs #68 and #73) (argh) - Can now set a preconfigured patBBCode object for the BBCode output filter, and added some documentation (argh) - Fixed the module file search that would not go through all defined folders (argh) - Added patch to translate function to allow combining of the translationFile and translationUseFolders options (argh) - Fixed bug #144: StripWhitespace output filter breaks UTF-8 encoded data (schst) - Added DB reader to read templates from any database supported by PEAR::DB (schst) - Fixed bug #74: Attributes "maxloop" and "conditions" causes PHP crash (schst) - Fixed an issue when using clearTemplate() on a template that does not exist (argh) - Fixed bug #150: Notice when enabling the template cache (schst) - Fixed bug #151: Invalid filemode in template cache (patch by Frank Kleine) - Fixed bug #153: pdflatex stops on errors (patch by p_ansell <at> yahoo [dot] com) - Fixed bug with variables that contain only one character (slerman) Changes since 3.1.0a2: - Fixed bug #152 (__single breaks first) (schst) - Allow multiple modifiers per variable (schst) - Implemented request #154: functions as defaults for variables (schst) - Add support for varscope __parent in variable modifier (gERD) - Add support for varscope __parent in variable tag (gERD) - Fixed bug #155: Automatically handle nested objects (schst) 3.1.0b2 3.1.0 beta stable 2006-11-21 LGPL Changes since 3.0.x: - allowed more than one namespace - added defaultFunction option, to define a function that is called for unknown functions - added new built-in condition __single - allow quoting variables using \{FOO\} - implemented autoload in Call function - added new system variable: {PAT_ROW_TYPE} = odd|even - added "rowOffset" attribute that determines the starting point of PAT_ROW_VAR - allow usage of $self in the return values of the expression modifier (by Andrew Eddie of Mambo) - added "relative" attribute to load templates relative to the current template (request #89) - the varscope attribute now supports a list of templates - in the requiredvars attribute of a simple condition template it is now possible to specify the exact value of a variable via requiredvars="var=value" (request #93) - added clearVar(), clearVars(), clearGlobalVar() and clearGlobalVars() (request #91) - added fourth parameter to addObject() to hide private properties - addObject() now checks, whether an object implements a getVars() method - added experimental XUL dump using PEAR::XML_XUL (needs a lot of love) - added TemplateCaches for MMCache and eAccelerator (contributed by Mike Valstar) - added placeholderExists() method (request #100) - added Truncate Modifier (contributed by Rafa Couto) - StripComments Input Filter now also strips Javascript multiline comments (Tim-Patrick M�rk) - Allow output filters for single templates (using the OutputFilter="..." attribute and applyOutputFilter()) (Request #114) - Add default variable modifiers for a template (Request #92) - Added OutputFilter to highlight PHP code - File Reader: Allow array containing several root directories as template root Changes since 3.1.0a1: - Allow the use of a variable in conditions (<pat:sub condition="{FOO}"/>) - Added new custom function Highlight that is able to apply syntax highlighting to your code (requires PEAR::Text_Highlighter) - Added new custom function Img to create HTML images (contributed by Jens Strobel) - Fixed notice in File reader (argh) - Added parameter for TemplateCache_File to set the filemode (request #127) - Added InputFilter that allows you to use the short variable modifier syntax of Smarty (schst, Axel Stettner) (request #136) - Fixed bug with condition __empty that was used instead of condition 0 (bug #132) - Fixed bug in Dateformat modifier - Fixed bug with condition templates that have __single and __empty defined (bug #138) - Bugfixes and new features in Translate function (bugs #68 and #73) (argh) - Can now set a preconfigured patBBCode object for the BBCode output filter, and added some documentation (argh) - Fixed the module file search that would not go through all defined folders (argh) - Added patch to translate function to allow combining of the translationFile and translationUseFolders options (argh) - Fixed bug #144: StripWhitespace output filter breaks UTF-8 encoded data (schst) - Added DB reader to read templates from any database supported by PEAR::DB (schst) - Fixed bug #74: Attributes "maxloop" and "conditions" causes PHP crash (schst) - Fixed an issue when using clearTemplate() on a template that does not exist (argh) - Fixed bug #150: Notice when enabling the template cache (schst) - Fixed bug #151: Invalid filemode in template cache (patch by Frank Kleine) - Fixed bug #153: pdflatex stops on errors (patch by p_ansell <at> yahoo [dot] com) - Fixed bug with variables that contain only one character (slerman) Changes since 3.1.0a2: - Fixed bug #152 (__single breaks first) (schst) - Allow multiple modifiers per variable (schst) - Implemented request #154: functions as defaults for variables (schst) - Add support for varscope __parent in variable modifier (gERD) - Add support for varscope __parent in variable tag (gERD) - Fixed bug #155: Automatically handle nested objects (schst) Changes since 3.1.0b1: - Fixed problem with condition templates and global variables (gERD) - Added placeholders for variable modifiers (gERD) 3.2.0a2 3.2.0 alpha stable 2007-06-13 LGPL Changes since 3.1.x: - added __onchange condition (schst) - template functions support both, runtime and on-read-time processing - use placeholders in template function's attributes