forked from pear/HTML_Template_Sigma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.xml
389 lines (378 loc) · 14 KB
/
package.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.5.1" 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 'compilation' 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: <!-- 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
</description>
<lead>
<name>Alexey Borzov</name>
<user>avb</user>
<email>[email protected]</email>
<active>yes</active>
</lead>
<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 'e' modifier for preg_replace(),
preg_replace_callback() is now used instead (bug #20068)
* Fixed built-in 'j' 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>
<contents>
<dir name="/" baseinstalldir="/">
<dir name="docs">
<dir name="templates">
<file name="example_1.html" role="doc" />
<file name="example_2.html" role="doc" />
<file name="example_3.html" role="doc" />
<file name="example_3_add.html" role="doc" />
<file name="example_3_include.html" role="doc" />
<file name="example_3_replace_1.html" role="doc" />
<file name="example_3_replace_2.html" role="doc" />
<file name="example_4.html" role="doc" />
</dir> <!-- /docs/templates -->
<file name="example_1.php" role="doc" />
<file name="example_2.php" role="doc" />
<file name="example_3.php" role="doc" />
<file name="example_4.php" role="doc" />
</dir> <!-- /docs -->
<dir name="tests">
<dir name="templates">
<file name="addblock.html" role="test" />
<file name="blockiteration.html" role="test" />
<file name="blocks.html" role="test" />
<file name="callback.html" role="test" />
<file name="globals.html" role="test" />
<file name="include.html" role="test" />
<file name="loadtemplatefile.html" role="test" />
<file name="replaceblock.html" role="test" />
<file name="__include.html" role="test" />
</dir> <!-- /tests/templates -->
<file name="AllTests.php" role="test">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file name="Sigma_api_testcase.php" role="test">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file name="Sigma_bug_testcase.php" role="test">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file name="Sigma_cache_testcase.php" role="test">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file name="Sigma_usage_testcase.php" role="test">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
</dir> <!-- /tests -->
<file name="HTML/Template/Sigma.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
</dir> <!-- / -->
</contents>
<dependencies>
<required>
<php>
<min>4.3.0</min>
</php>
<pearinstaller>
<min>1.5.4</min>
</pearinstaller>
<extension>
<name>ctype</name>
</extension>
</required>
</dependencies>
<phprelease />
<changelog>
<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: <!-- COMMENT --> ... <!-- /COMMENT -->
* Added new builtin callbacks 'e' and 'r' for htmlentities() and
rawurlencode(), respectively
* Added the 'charset' option for builtin 'h' and 'e' 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 'b' 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 <franz at quox.net> 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
'h' for htmlspecialchars()
'u' for urlencode()
'j' 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'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'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('Hello, {username}!').
* 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()'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 'use_preg' 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 'prepared' 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>