<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.10.13" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
 <name>HTML_Template_Sigma</name>
 <channel>pear.php.net</channel>
 <summary>An implementation of Integrated Templates API with template &apos;compilation&apos; added</summary>
 <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: &lt;!-- INCLUDE --&gt;
* 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(&apos;Hello world!&apos;) and to define callback functions for these
* &apos;Compiled&apos; templates: the engine has to parse a template file using regular expressions to find all the blocks and variable placeholders. This is a very &quot;expensive&quot; 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</description>
 <lead>
  <name>Alexey Borzov</name>
  <user>avb</user>
  <email>avb@php.net</email>
  <active>yes</active>
 </lead>
 <date>2025-10-31</date>
 <time>20:38:13</time>
 <version>
  <release>1.4.0</release>
  <api>1.4.0</api>
 </version>
 <stability>
  <release>stable</release>
  <api>stable</api>
 </stability>
 <license uri="http://www.php.net/license">PHP License</license>
 <notes>
* Added a proper __construct() method (see bug #20967, bug #23751)
* Fixed examples to run on recent PHP versions
* Unit tests are run on PHP 5.6 to PHP 8.4 thanks to PHPUnit Polyfills package,
  continuos integration is enabled on GitHub.
* It is possible to throw an instance of HTML_Template_Sigma_Exception
  instead of returning PEAR_Error in case of error, this is enabled by
  setting an &apos;exceptions&apos; option to true: $tpl-&gt;setOption(&apos;exceptions&apos;, true);
  This is disabled by default.
* Minimum required PHP version is now 5.6
 </notes>
 <contents>
  <dir baseinstalldir="/" name="/">
   <file baseinstalldir="/" md5sum="c73aa61cf3768876de63134621b4ec73" name="docs/templates/example_1.html" role="doc" />
   <file baseinstalldir="/" md5sum="611d8ffadff7a34221e06f1256e9093d" name="docs/templates/example_2.html" role="doc" />
   <file baseinstalldir="/" md5sum="a215039ffd864141c9899bd1e8226f47" name="docs/templates/example_3.html" role="doc" />
   <file baseinstalldir="/" md5sum="c08c9adbd1875e61ce6a1c101d897f23" name="docs/templates/example_3_add.html" role="doc" />
   <file baseinstalldir="/" md5sum="268bb32ea6c4da9022ece99d0e19d778" name="docs/templates/example_3_include.html" role="doc" />
   <file baseinstalldir="/" md5sum="f056556a005b4df22f0ba68292e0362f" name="docs/templates/example_3_replace_1.html" role="doc" />
   <file baseinstalldir="/" md5sum="8ab37c7241e4cbdd133f1fb7ab4e8a8a" name="docs/templates/example_3_replace_2.html" role="doc" />
   <file baseinstalldir="/" md5sum="f65c179ad69f91f6cc4c65328a34232d" name="docs/templates/example_4.html" role="doc" />
   <file baseinstalldir="/" md5sum="fac4ead0099b6598928132d5ba0118e9" name="docs/example_1.php" role="doc" />
   <file baseinstalldir="/" md5sum="e7a924bba06a5b597cf8ded563428b4d" name="docs/example_2.php" role="doc" />
   <file baseinstalldir="/" md5sum="adecd6b4c7f6d36d5d91d6bc77c780df" name="docs/example_3.php" role="doc" />
   <file baseinstalldir="/" md5sum="5657f732cd7bc6483fee86c59954b0e9" name="docs/example_4.php" role="doc" />
   <file baseinstalldir="/" md5sum="bca97392b741f553d10203f04549a423" name="tests/templates/addblock.html" role="test" />
   <file baseinstalldir="/" md5sum="d4e1caf0b07b85e49e0e82ab83e91ed3" name="tests/templates/blockiteration.html" role="test" />
   <file baseinstalldir="/" md5sum="aa11dc0ba8c94c71f0ed6e448770f913" name="tests/templates/blocks.html" role="test" />
   <file baseinstalldir="/" md5sum="d1eb1470f7bacf2919c1cc5794b3625a" name="tests/templates/callback.html" role="test" />
   <file baseinstalldir="/" md5sum="daeb5afea09cd73a89488d267268ccd1" name="tests/templates/globals.html" role="test" />
   <file baseinstalldir="/" md5sum="8ac12c5d1c85787dd44ed5c93a392dfe" name="tests/templates/include.html" role="test" />
   <file baseinstalldir="/" md5sum="bd4c99366021b8bd88ba220ec829eae5" name="tests/templates/loadtemplatefile.html" role="test" />
   <file baseinstalldir="/" md5sum="a3d70ab52bdb9f3c14702879865a55d6" name="tests/templates/replaceblock.html" role="test" />
   <file baseinstalldir="/" md5sum="fb1681e6ffa470d92859fac3496b960e" name="tests/templates/__include.html" role="test" />
   <file baseinstalldir="/" md5sum="51ded34e1af41619a5792a95756ee298" name="tests/SigmaApiTest.php" role="test">
    <tasks:replace from="@package_version@" to="version" type="package-info" />
   </file>
   <file baseinstalldir="/" md5sum="13b50f4da1b6ff7f82b82bce676bc821" name="tests/SigmaCacheTest.php" role="test">
    <tasks:replace from="@package_version@" to="version" type="package-info" />
   </file>
   <file baseinstalldir="/" md5sum="cbf35f39ca9e14d2dc5cef0913a339ef" name="tests/SigmaUsageTest.php" role="test">
    <tasks:replace from="@package_version@" to="version" type="package-info" />
   </file>
   <file baseinstalldir="/" md5sum="7a9121fddb42253dc03ad003c902a9b6" name="HTML/Template/Sigma/Exception.php" role="php">
    <tasks:replace from="@package_version@" to="version" type="package-info" />
   </file>
   <file baseinstalldir="/" md5sum="6277ae5bda527c8232248c8c190e0030" name="HTML/Template/Sigma.php" role="php">
    <tasks:replace from="@package_version@" to="version" type="package-info" />
   </file>
  </dir>
 </contents>
 <dependencies>
  <required>
   <php>
    <min>5.6.0</min>
   </php>
   <pearinstaller>
    <min>1.10.0</min>
   </pearinstaller>
   <extension>
    <name>ctype</name>
   </extension>
  </required>
 </dependencies>
 <phprelease />
 <changelog>
  <release>
   <date>2014-01-09</date>
   <version>
    <release>1.3.0</release>
    <api>1.2.0</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Implemented a more robust cache writing algorithm, this should prevent
  writing empty cache files and reading incomplete ones (bug #19220)
* Got rid of deprecated &apos;e&apos; modifier for preg_replace(),
  preg_replace_callback() is now used instead (bug #20068)
* Fixed built-in &apos;j&apos; callback to allow using escaped strings in inline JS

* Updated code to better conform to PEAR coding standards
* Updated code and tests to generate fewer errors under PHP5
* The minimum PHP version is now 4.3.0, as file_get_contents() is used
   </notes>
  </release>
  <release>
   <version>
    <release>1.2.0</release>
    <api>1.2.0</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2008-07-22</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Changed unit tests to use current PHPUnit from http://www.phpunit.de/ rather
than old unsupported one from http://pear.php.net/

Implemented parts of request #12221 (thanks to Carsten Wiedmann for ideas and
their initial implementation)
 * It is now possible to add comments to the template file that are removed
   from output: &lt;!-- COMMENT --&gt; ... &lt;!-- /COMMENT --&gt;
 * Added new builtin callbacks &apos;e&apos; and &apos;r&apos; for htmlentities() and
   rawurlencode(), respectively
 * Added the &apos;charset&apos; option for builtin &apos;h&apos; and &apos;e&apos; callbacks
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.6</release>
    <api>1.1.5</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2007-05-19</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Migrate to package.xml version 2.0, use proper header comment blocks.
Minor fixes to phpdoc comments, no code changes since previous release.
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.5</release>
    <api>1.1.5</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2006-05-31</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Fixed bug #6346: typo in _buildFunctionList()
Fixed bug #6902: correctly handle drive letters and path separators on Windows
Fixed bug #6905: use &apos;b&apos; modifier for fopen() to prevent problems with cached templates on Windows
Calling setCacheRoot() with an empty argument will now disable caching. It was impossible
to disable it with previous behaviour.

Added possibility to pass arrays as second arguments to setVariable() and setGlobalVariable(),
this will assign values to placeholders of the form {varName.arrayKey} in the template.
Thanks to Franz Pentenrieder &lt;franz at quox.net&gt; for idea and original implementation.
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.4</release>
    <api>1.1.2</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2005-11-05</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Fixed bug #5168: Prevent problems with template functions in included files
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.3</release>
    <api>1.1.2</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2005-08-09</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Fixed bug #4896 (loading a zero-length template file caused a warning)
* Fixed bug #5012 (placeholder delimiters were hardcoded in several places,
  which prevented using custom delimiters)
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.2</release>
    <api>1.1.2</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2004-10-20</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Changed the code for parsing template function arguments. It will
now correctly unescape the escaped quotes within quoted arguments
(see bug #1840).
The new code throws errors on bogus arguments. If you previously
relied on undocumented behaviour of argument parsing method, your 
code may break: test before upgrading.
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.1</release>
    <api>1.1.1</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2004-05-31</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Callbacks are not called if the block containing them is empty. Thanks
to Sergey Vasiliev for the suggestion.
   </notes>
  </release>
  <release>
   <version>
    <release>1.1.0</release>
    <api>1.1.0</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2004-04-14</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Fixed #876 (get_class() and get_class_methods() usage with PHP5)
  Unit tests run on PHP5, all tests pass.
* Added clearVariables() method (see also #939)
* Added shorthand syntax for callbacks: {var:callback} instead of 
  func_callback({var})
* Added builtin callbacks
	&apos;h&apos; for htmlspecialchars()
	&apos;u&apos; for urlencode()
	&apos;j&apos; to escape the string for usage in Javascript

This release is dedicated to Lukas Smith
   </notes>
  </release>
  <release>
   <version>
    <release>1.0.2</release>
    <api>1.0.1</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2003-10-02</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Removed _callbackExists() method, is_callable() is used instead
* Check for SIGMA_OK instead of PEAR::isError() where possible
* Fixed unit tests packaging. Should work OK in PEAR installation
   </notes>
  </release>
  <release>
   <version>
    <release>1.0.1</release>
    <api>1.0.1</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2003-05-20</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Added getBlockList() and getPlaceholderList() methods (thanks to Markus Wolff for the idea).
* HTML_Template_IT compatibility: get() does not clear the parsed block contents by default.
* Removed obsolete docs, current ones are in the PEAR manual.
   </notes>
  </release>
  <release>
   <version>
    <release>1.0</release>
    <api>1.0</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2003-04-28</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
This release has Sigma&apos;s template functions/callbacks infrastructure significantly enhanced.
This unfortunately means some backwards compatibility breaks. If you were using callbacks before, please carefully examine the release notes and test you scripts before upgrading to 1.0.
If you weren&apos;t using callbacks due to their shortcomings it is a good time to give them a try, consult docs/example_4.php for some of their possible applications.

Template functions/callbacks changes and incompatibilities:

* Templates are parsed for function calls not only on setTemplate()/loadTemplatefile(), but on addBlock()/addBlockfile() and replaceBlock()/replaceBlockfile() as well.
* The arguments to template functions can now contain variable placeholders: func_uppercase(&apos;Hello, {username}!&apos;).
* Template functions are now compatible with template caching.
* Method setCallbackFunction() now accepts a callback that is compatible with call_user_func() as its second argument. Its third argument is used to control variable substitution in function arguments.
* Method performCallback() was removed. Callbacks are now called automatically when the block containing them is parse()&apos;d.
* Callbacks are now called via call_user_func_array() instead of call_user_func(). This makes it possible to use built-in functions as callbacks, but also means that you have to rewrite your old functions!
* Usage example is available in docs/example_4.php

Other changes:

* Option &apos;use_preg&apos; was removed.
* Stricter error checking when doing addBlockfile() with a prepared template.
   </notes>
  </release>
  <release>
   <version>
    <release>0.9.2</release>
    <api>0.9.2</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2003-04-21</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Added usage examples
* Added the cache FAQ
* This is the last 0.9.x release unless some bugs are found. The 1.0 release will 
  have callbacks significantly redone and will require changes to your scripts if
  you use callbacks.
   </notes>
  </release>
  <release>
   <version>
    <release>0.9.1</release>
    <api>0.9.1</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2003-04-18</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
* Fix: if source template does not exist, do not load the &apos;prepared&apos; one, throw an error instead.
  Thanks to Maxim Panasiuk for the report.
   </notes>
  </release>
  <release>
   <version>
    <release>0.9</release>
    <api>0.9</api>
   </version>
   <stability>
    <release>stable</release>
    <api>stable</api>
   </stability>
   <date>2003-04-04</date>
   <license uri="http://www.php.net/license">PHP License</license>
   <notes>
Initial PEAR release
   </notes>
  </release>
 </changelog>
</package>
