forked from rsky/pear-html_template_flexy
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.xml
More file actions
1455 lines (1302 loc) · 54.1 KB
/
Copy pathpackage.xml
File metadata and controls
1455 lines (1302 loc) · 54.1 KB
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
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.9.0RC1" 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_Flexy</name>
<channel>pear.opendogs.org</channel>
<summary>An extremely powerful Tokenizer driven Template engine</summary>
<description>HTML_Template_Flexy started it's life as a simplification of HTML_Template_Xipe,
however in Version 0.2, It became one of the first template engine to use a real Lexer,
rather than regex'es, making it possible to do things like ASP.net or Cold Fusion tags.
However, it still has a very simple set of goals.
- Very Simple API,
o easy to learn...
o prevents to much logic going in templates
- Easy to write document'able code
o By using object vars for a template rather than 'assign', you
can use phpdoc comments to list what variable you use.
- Editable in WYSIWYG editors
o you can create full featured templates, that doesnt get broken every time you edit with
Dreamweaver(tm) or Mozilla editor
o Uses namespaced attributes to add looping/conditionals
- Extremely Fast,
o runtime is at least 4 time smaller than most other template engines (eg. Smarty)
o uses compiled templates, as a result it is many times faster on blocks and loops than
than Regex templates (eg. IT/phplib)
- Safer (for cross site scripting attacks)
o All variables default to be output as HTML escaped (overridden with the :h modifier)
- Multilanguage support
o Parses strings out of template, so you can build translation tools
o Compiles language specific templates (so translation is only done once, not on every request)
- Full dynamic element support (like ASP.NET), so you can pick elements to replace at runtime
Features:
- {variable} to echo $object->variable
- {method()} to echo $object->method();
- {foreach:var,key,value} to PHP foreach loops
- tag attributes FLEXY:FOREACH, FLEXY:IF for looping and conditional HTML inclusion
- {if:variable} to PHP If statement
- {if:method()} to PHP If statement
- {else:} and {end:} to close or alternate If statements
- FORM to HTML_Template_Flexy_Element's
- replacement of INPUT, TEXTAREA and SELECT tags with HTML_Template_Flexy_Element code
use FLEXY:IGNORE (inherited) and FLEXY:IGNOREONLY (single) to prevent replacements
- FLEXY:START/FLEXY:STARTCHILDREN tags to define where template starts/finishes
- support for urlencoded braces {} in HTML attributes.
- documentation in the pear manual
- examples at http://svn.php.net/pear/packages/HTML_Template_Flexy/trunk/tests/</description>
<lead>
<name>Alan Knowles</name>
<user>alan_k</user>
<email>alan@akbkhome.com</email>
<active>yes</active>
</lead>
<contributor>
<name>Ryusuke SEKIYAMA</name>
<user>rsk</user>
<email>rsky0711@gmail.com</email>
<active>yes</active>
</contributor>
<date>2013-03-31</date>
<time>22:18:00</time>
<version>
<release>1.3.13alpha6</release>
<api>1.3.0</api>
</version>
<stability>
<release>alpha</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- fork from https://github.com/pear/Pager [Ryusuke SEKIYAMA]
- fix installation with composer [Ryusuke SEKIYAMA]
- fix problem with htmlspecialchars and PHP 5.4 [Ryusuke SEKIYAMA]
- no longer supports PHP version < 5.3 [Ryusuke SEKIYAMA]
</notes>
<contents>
<dir baseinstalldir="/" name="/">
<file baseinstalldir="/" name="examples/EMPTY_FOLDERS_NOTHING_IN_HERE" role="doc" />
<file baseinstalldir="/" name="HTML/Template/Flexy.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Assign.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/compileAll.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Element.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/example.ini" role="data" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Factory.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Plugin.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/SmartyAPI.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Test.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Tokenizer.lex" role="data" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Tokenizer.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Translator.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Tree.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Flexy.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/SmartyConvertor.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Standard.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Flexy/CustomFlexyAttributes.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Flexy/Flexy.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Flexy/Tag.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/BodyOnly.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/Mail.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/Math.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/Php.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/RtfSimpleTags.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/SimpleTags.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Regex/Xml.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Standard/Flexy.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Compiler/Standard/Tag.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Element/Xul.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Plugin/Savant.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/templates/translator.html" role="doc" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Cdata.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Else.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/End.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/EndTag.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Foreach.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/If.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Method.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Processing.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Tag.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Text.php" role="php" />
<file baseinstalldir="/" name="HTML/Template/Flexy/Token/Var.php" role="php" />
<file baseinstalldir="/" name="tests/make_tests.php" role="test" />
<file baseinstalldir="/" name="tests/test.php" role="test" />
<file baseinstalldir="HTML/Template" name="tests/testsuite.php" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_blocks.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_bug_2959.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_conditions.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_error_foreach.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_flexy_tojavascript.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_forms.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_function.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_globals.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_image_view.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_include.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_javascript.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_looping.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_methods.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_namespaces.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_plugin_modifiers.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_raw_php.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_raw_text.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_style.html.phpt" role="test" />
<file baseinstalldir="/" name="tests/test_usesname.html.phpt" role="test" />
<file baseinstalldir="HTML/Template" name="tests/test_variables.html.phpt" role="test" />
<file baseinstalldir="/" name="tests/treeTest.php" role="test" />
<file baseinstalldir="/" name="tests/results2/blocks.html.en.php" role="test" />
<file baseinstalldir="/" name="tests/results2/blocks.html.en.php#block1" role="test" />
<file baseinstalldir="/" name="tests/results2/blocks.html.en.php#block2" role="test" />
<file baseinstalldir="/" name="tests/results2/blocks.html.gettext.serial" role="test" />
<file baseinstalldir="/" name="tests/results2/forms.html.elements.serial" role="test" />
<file baseinstalldir="/" name="tests/results2/forms.html.en.php" role="test" />
<file baseinstalldir="/" name="tests/results2/forms.html.gettext.serial" role="test" />
<file baseinstalldir="/" name="tests/results2/forms.result.html" role="test" />
<file baseinstalldir="/" name="tests/results2/function.html.en.php" role="test" />
<file baseinstalldir="/" name="tests/results2/function.html.gettext.serial" role="test" />
<file baseinstalldir="/" name="tests/results2/function.result.html" role="test" />
<file baseinstalldir="/" name="tests/results2/globals.html.en.php" role="test" />
<file baseinstalldir="/" name="tests/results2/globals.html.gettext.serial" role="test" />
<file baseinstalldir="/" name="tests/results2/namespaces.html.en.php" role="test" />
<file baseinstalldir="/" name="tests/results2/raw_php.html.en.php" role="test" />
<file baseinstalldir="/" name="tests/smarty/index.tpl" role="test" />
<file baseinstalldir="/" name="tests/smarty/index.tpl.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/smarty/smartytest.php" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/blocks.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/bug_2959.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/conditions.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/error_foreach.html" role="test" />
<file baseinstalldir="/" name="tests/templates/flexy_raw_with_element.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/flexy_tojavascript.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/forms.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/function.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/globals.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/image_view.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/include.html" role="test" />
<file baseinstalldir="/" name="tests/templates/includes.html" role="test" />
<file baseinstalldir="/" name="tests/templates/include_block.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/javascript.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/looping.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/methods.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/namespaces.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/plugin_modifiers.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/raw_php.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/raw_text.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/style.html" role="test" />
<file baseinstalldir="/" name="tests/templates/usesname.html" role="test" />
<file baseinstalldir="HTML/Template" name="tests/templates/variables.html" role="test" />
<file baseinstalldir="/" name="tests/trees/blocks.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/conditions.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/error_foreach.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/flexy_tojavascript.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/forms.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/function.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/globals.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/image_view.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/includes.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/javascript.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/looping.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/methods.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/namespaces.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/plugin_modifiers.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/raw_php.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/raw_text.html.tree" role="test" />
<file baseinstalldir="/" name="tests/trees/variables.html.tree" role="test" />
<file baseinstalldir="/" name="ChangeLog" role="data" />
<file baseinstalldir="/" name="TODO" role="data" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>5.3.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
</pearinstaller>
</required>
<optional>
<package>
<name>HTML_Javascript</name>
<channel>pear.php.net</channel>
<min>1.1.0</min>
</package>
<package>
<name>File_Gettext</name>
<channel>pear.php.net</channel>
<min>0.2.0</min>
</package>
<package>
<name>Translation2</name>
<channel>pear.php.net</channel>
<min>0.0.1</min>
</package>
</optional>
</dependencies>
<phprelease />
<changelog>
<release>
<date>2011-08-29</date>
<version>
<release>1.3.12</release>
<api>1.3.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor fixes and feature release
Bug Fixes
#18763 - Fix is_a() for 5.3.7+ due to php-core stupidity
#----- - Support for new PEAR5 class.
Features
#----- - support for CommonPageID when using Translation2
</notes>
</release>
<release>
<date>2011-01-11</date>
<version>
<release>1.3.11</release>
<api>1.3.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor fixes and feature release
Bug Fixes
#----- - PHP5 E_STRICT warnings removed
</notes>
</release>
<release>
<date>2010-06-07</date>
<version>
<release>1.3.10</release>
<api>1.3.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor fixes and feature release
Bug Fixes
#17390 - id nameuses replacement got broken on previous commit (Christophe Husson)
#17210 - remove error suppression
#16978 - support non-ascii vars
#14895 - local environment settings in test (clockwerx)
New Features/Changes
#16554 - support dontCompile option
#----- - provisional support for label property of elements outputing as associated
label content (Stephane Matamontero)
#----- - new option disableTranslate - blocks all translation features,
like writing .serial files. (Stephane Matamontero)
#----- - Element merge code moved element class - reducing size of base class (Alan)
#----- - SVN layout changed. (clockwerx)
</notes>
</release>
<!-- these are all in the wrong order now!!! -->
<release>
<version>
<release>0.1</release>
<api>0.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2002-09-07</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
First PEAR release,
- Renamed to HTML_Flexy_Template to conform to PEAR standards
- Added more phpdoc comments to filters
- Removed getTemplateDir method (legacy/unused)
- Added multilanguage support options['locale'] - in theory a i18n filter could be added.
Othewise it just checks to see if a template/compiled template with ????.{locale}.???
exists
- added staticQuickTemplate($template,$object) for quickly including subtemplates.
- added {q_include:#aaaaa.html#} to simpletags to support quicktemplate.
- changed to DIRECTORY_SEPERATOR and removed base directory check in windows.
</notes>
</release>
<release>
<version>
<release>0.2</release>
<api>0.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-02-03</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Major overhall of engine
- Introduction of Lex based Parser. - A real syntax checking
Template generator
- Ability to do Coldfusion style HTML attributes like foreach="abc,b,c" in TR or any tag.
- Automatically converts form elements (INPUT, TEXTAREA, SELECT) contents to suitable PHP code
and adds error messages.
- docs temporarily at http://devel.akbkhome.com/peardoc2/package.html.html-template-flexy.html
Note: Filter features of original HTML_Template_Flexy are now depreciated.
Note: This is not backwards compatible with version 0.1!
</notes>
</release>
<release>
<version>
<release>0.3</release>
<api>0.3</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-02-06</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Bug fixes
- allow usage with only constructor options
- fixed form elements - should be htmlspecialchars, rather than urlencoding
- new Tokenizer is enabled by default - set 'useLegacy' in config/options to
use the old regex replacer.
- no variables are added (eg. o.*, a.* etc. to the page unless useLegacy is set)
- parsers are now private methods. (internal change)
New Features
- FLEXYSTART and FLEXYSTARTCHILDREN tags added so when use you include sub
templates, you can avoid including HEAD etc. tags.
</notes>
</release>
<release>
<version>
<release>0.4</release>
<api>0.4</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-04-17</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Warning BC breaking release:
- It is likely that form code may break with this due to the quickform integration
- likely issues: you will probably have to load the template and assign data to it
using $template->setQuickForm($this);
which will then expose $template->quickform as the template Object.
Bug fixes
- fixed #literal# chopping bug (Yuri Dyakonov)
- fixed XML/XHTML support (no more munging of cases)
- fixed Fatal Error messages - with more details
- fixed whitespace in doctype tags. (wierd lexer stuff)
Features
- quickforms (3) integration added.
- quickforms with multiple forms $flexyobj->quickforms[0.....]
- Initial gettext/multilanguage support
- support variable[12] as a valid variable name.
- does syntax checking on form element names
- fixed {outputBody()} (no prefix var methods)
- added url_rewrite for HREF and SRC tags - see example.ini for more details
- added compileAll.php script for bulk compilation on servers that do not have
write access to the directories they are serving off.
- Added extra Option - nonHTML to not make tokens of HTML tags, and enable postprocessing
of compiled template to replace ?>\n with ?>\n\n (aimed at email templates)
- Added extra Option - allowPHP to enable PHP code in template to be left alone. - defaults
to off (eg. no PHP allowed) -
- added support for <TAG IF="somevar.xxxx" and
<TAG IF="somevar.method()" maps to if (the test) <TAG .....
- handles elements with same name, like radio buttons - although performing modifications on
them can be tricky..
While may thanks are owed to the many beta testers, special mention to Xavier
for spotting some really annoying little bugs.
</notes>
</release>
<release>
<version>
<release>0.4.1</release>
<api>0.4.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-06-11</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Bug fixes
- fixed #literal# support for method calls - hopefully finally (Yuri Dyakonov)
- BC support for getOptions call on objects (Marcin Galczynski)
Features
- method calls with literals at end can now use modifiers (:h/:u etc.)
</notes>
</release>
<release>
<version>
<release>0.5</release>
<api>0.5</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-09-03</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Warning: BC Breaking release
Warning: Still in Beta Testing.. (although most of the API should now be settled)
Due to the conclusion that the quickforms integration was not only messy, but
a heavy weight to be carried. The whole form/dynamic element layer was re-engineered.
And the dependancy on QuickForms removed
New Features
HTML_Template_Flexy_Element, is a small simple representation of generic HTML,
it is used to store the representation of form elements, and any HTML element
which contains the FLEXY:DYNAMIC attribute.
you can override elements, by using the new second argument to outputObject($object,$elements)
where $elements is an associate array of (form name)=>Element
and the data in the elements array is merged with the visable template at runtime.
(so you only need to define what is different to the HTML, not the whole tag.)
You can make any tag 'dynamic', by just tagging it. - if you replace the element
in the elements array with an object that implements a toHtml method, This will be
called rather than the drawn element.
A Utility class, HTML_Template_Flexy_Factory offers common static methods, like
- creating element values from a key=>value array (eg. Dataobjects->toArray())
- setting error messages (as suffixes to elements)
- flag something as required. (prefixing strings to elements)
Compiler Abstraction
The Compiler code in Flexy is now abstracted out, to make it possible to write
Other compilers and use the same caching/loading mechanism. (the old regex compiler
is included as an example of this.)
Other BC Issues:
all Flexy attributes must now be prefixed with "flexy:" namespace (eg. if, foreach, startchildren etc.)
Other New Features
- support for array strings on variables and methods = eg. {somevar[xxx][yyy].toHtml():h}
- added new Modifiers :r (print_r), and :n (number_format), and in future may make available user defined modifiers
</notes>
</release>
<release>
<version>
<release>0.5.1</release>
<api>0.5.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-09-04</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Fixes
- bufferedOutputObject correctly deals with elements array (Stephan Wentz)
Note: See Version 0.5 release notes concerning BC issues with 0.4 series
</notes>
</release>
<release>
<version>
<release>0.6</release>
<api>0.6</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-12-20</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
This is a major fix release, along with quite a few new usefull features,
many thanks to the various bug reporters, and especially from the Damein Turner and
The Seagull framework Team
Hopefully, it is now the last beta before a stable release.....
New features
- &lt;flexy:include src="xxx.html"/> to include other templates
- &lt;flexy:toJavascript flexy:prefix="js_name_prefix_" jsvar="php_flexy_var" ....>
uses HTML_Javascript_Convert to import PHP variables into Javascript.
- new modifier :b (for NL2BR + HTMLSPECIALCHARS)
- support for mulitple paths in templateDir
- attribute flexy:raw="{checked}" allows you to to put raw data into a tag.
- -- double minus, is valid inside comments (not really valid XHTML though)
- global flexyIgnore option, to prevent global conversion to Elements.
- better support for elements where name="someval[]"
Fixes
- array syntax supported in attributes (eg. urlencoded)
- setting values of elements with type works (bug #460)
- methods with multiple arguments fixed.
- HTML_Template_Flexy_Element::removeAttribute() works
(removing attributes is done by setting them to false)
- include error on EndTag
- closed element (eg. with /> at end, can be used with flexy:if=
- radio buttons should auto create id's if none are set.
- xdebug recursion level increased (as the compiler recursion is high)
- buffered output with $elements fixed.
Note: See Version 0.5 release notes concerning BC issues with 0.4 series
</notes>
</release>
<release>
<version>
<release>0.6.1</release>
<api>0.6.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2003-12-21</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Bugfix release
- got javascript script wrapper wrong.
</notes>
</release>
<release>
<version>
<release>0.6.2</release>
<api>0.6.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-01-20</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor Bugfix / mini feature release
- support flexy:if with method arguments eg.
flexy:if="somemethod(#with#,some,#args#)"
- foreach works on objects and arrays. : eg.
flexy:foreach="someobject"
</notes>
</release>
<release>
<version>
<release>0.6.3</release>
<api>0.6.3</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-01-21</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor Bugfix
- fixed class="{some_method(with_some_args)}"
</notes>
</release>
<release>
<version>
<release>0.7</release>
<api>0.7</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-04-03</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Last Beta release - (eg. it's a RC Release - next one will be stable!!! hopefully)
Minor Bugfix
- fixed bug #643 (compile incorrectly tests for string on windows.)
- fixed bug #615 constructor can not return errors
* check for compileDir isDir is in the compile() anyway..
- fix bug 1120: remove necessity to use flexy:ignoreonly,
* if a input tag has {variable} the engine assumes you dont want use a flexy_element.
- fix bug #809 - extra minuses in comments
(too may ---> caused problems )
- fix bug #874 (literals with commas in flexy:if)
flexy:if=(#aaa,bbb#) correctly seen as a single attribute
- fix bug 739 - syntax checking on foreach
flexy:foreach="singlevalue" now flagged as error.
- /flexy:include and toJavascript closers now correctly ignored.
- fix #856 - fix get_class usage.
- Fix bug when too many closing tags could zero the stack and delete parts of the template.
New Features
- config option templateDirOrder=reverse, allows you to prefer the first found template,
rather than the last found template (when using theme type configurations)
- Engine uses File_Gettext if gettext is not found. (or textdomain is set.)
- Provisional SmartyConverter compiler,
* provides a basic Coversion of Smarty to Flexy templates
- Provisional SmartyAPI emulator added.
* allows drop in replacement of flexy with simple code that uses Smarty.
- strict option
so variable can emit errors if they are not defined.
- multiSource option
for enabling themes type systems, where you can override the default template folder
with your own custom designs.
Behaviour changed
- templateDir can be an array, or string seperated by the system path seperatory
(; on windows,: on unix)
- If a file exists in multiple paths, then The LAST FOUND template will be used.
(previously this emited an error)
- If you use multiple paths in the template_dir, then the path will be modified to
write to {compileDir}/{basename(actualTemplateDir)}_{md5(actualTemplateDir)}/...template..
</notes>
</release>
<release>
<version>
<release>0.7.1</release>
<api>0.7.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-04-07</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Last Beta releases - (eg. it's a RC Release - stable will be within a month!!! hopefully)
Security: *** THIS AFFECTS __ALL__ PREVIOUS RELEASES ****
HTML_Template_Flexy_Element::setOptions and HTML_Template_Flexy_Element::setValue
with textareas did not htmlspecialchars escape text automatically -
opening up potential for cross site scripting posibliities..
Bugs:
radio buttons and hidden fields with same name could be created - blanking out the radio buttons
url_rewrite option is now syntax tested.
Features:
An attempt to create base Compile directory if it doesnt exist.
</notes>
</release>
<release>
<version>
<release>0.8.0</release>
<api>0.8.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-04-22</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Feature addition release:
Moving to stable is posponed another month, so these new features get a thorough testing.
Bugs / Fixes:
* fixed overzealous closing on some tags
* fixed double html escaping of some dynamic attributes
* ignore empty url_rewrite options (eg. images/:/templates/images,,)
* fixed recursion death, on &lt;s&gt; tags
* fixed flexy {variables} inside attributes='that are single quoted'
* unknown namespaces are assumed to be HTML (so XUL with html works ok)
Features:
* Translation2 transparent translation backend support
$options['Translation2'] = array(
'driver' => 'dataobjectsimple',
'options' => array()
)
will instantate Translation2 once , and call it to translate
all strings found when compiling.
* Strings to be translated can be explicitly marked by encapsulating them
in {_( ....... )_}
Parsing is done prior to tokenizing, so you can include {variables} inside
the translation strings.
* Access to private variables and methods now possible eg.
{_myprivate_var}
** requires option['privates'] = true
* Access to super global variables now possible eg.
{_SESSION[lang]} {_GET[posted]} {_POST[posted]}
{_REQUEST[lang]} {GLOBALS[posted]} {_COOKIES[posted]}
** requires option['globals'] = true
(as per all variable, these are html escaped by default, for security reasons,
over-ride with the :h modifier)
* Access to php functions now possible
{GLOBALS.date(mydate,#d/m/y#)}
** requires option['globalfunctions'] = true
** this is a big security hole if you dont trust your template authors,
it exposes exec() etc.
* New Test infrastructure in CVS - enabling better unit testing.
</notes>
</release>
<release>
<version>
<release>0.8.1</release>
<api>0.8.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-04-24</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Bugfix release:
Moving to stable Planned Sometime after Late May 2004
Bugs / Fixes:
* Stoped Javascript being striped when language= tag not used.
* PHP5 tested
* javscript and php code not added to gettext string list.
Add test suite to package.
</notes>
</release>
<release>
<version>
<release>0.8.2</release>
<api>0.8.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-05-05</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Bugfix release:
Moving to stable Planned Sometime after Late May 2004
Bugs / Fixes:
* Bug #1274
* Test added for Bug #1310
* fix Flexy_Element::setOptions / Flexy_Element::setValue, using a value of 0
highlighting everything.
* Closing Tags for XHTML closers correctly placed at end of tag.
(Flexy_Element only)
* url_rewriting now works in &lt;?xml-stylesheet tags. (they are treaded similar to
normal html tags now. (and only the opening &lt; is written using php.
* closers for namepaced tags are now output (big oops bug..)
</notes>
</release>
<release>
<version>
<release>0.9.0</release>
<api>0.9.0</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-05-06</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
minor BC break release:
Moving to stable Planned Sometime after Late May 2004
BC Break on Gettext string storage.
* during parsing of the template flexy builds an array of strings that
can be used to automate translation.
The strings in this array used to be escaped (similar to addslashes).
This proved to be a bad decision (As the unescaping and escaping got too messy)
- the strings are now stored as they are found. (albiet still trimmed)
New Features:
* strings from option tags, and value of input tags are added to gettext array.
* ability to generate namespaced options (eg. for XUL)
$x = new HTML_Template_Flexy_Element('html:select');
$x->setOptions(array(1=>'test'));
</notes>
</release>
<release>
<version>
<release>0.9.1</release>
<api>0.9.1</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-06-17</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Feature addition release
support for function blocks
<flexy:function name="myfunction"> define a block here </flexy:function>
<flexy:function call="myfunction"> calls the function </flexy:functio>
<flexy:function call="{somevar}"> variable function calls </flexy:function>
support for static template compiles
options[compiler] = raw
plugin support and user defined modifiers using plugins
{this.plugin(#name#,var,var):h}
{var:formatdate} (calls plugin
{var:formatnumber}
Assign API support using setData() and setDataByRef()
</notes>
</release>
<release>
<version>
<release>0.9.2</release>
<api>0.9.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2004-06-24</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Feature addition release
support for id blocks
$flexy->compile('sometemplate.html#mytag');
will compile a file {compileDir}/sometemplate.html#mytag
which contains the tag and contents of <span id="mytag"> ... </span>
flexy:function call="xxx" checks that the user defined function block exists
</notes>
</release>
<release>
<version>
<release>1.0.0</release>
<api>1.0.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-08-07</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
The Long Awaited Gold Release.
Bug Fixes:
#1675 - CRLF fixes on windows
#------ Elements with matching key = value where incorrectly rendered.
Tweaks:
* minor changes to simple Smarty Template Converter/Processor
* Default Compiler is now called Flexy
* Added Translator tool to package (see Translator.php source for usage)
* Translator Tool includes clearTemplateCache - removes all files.
* Some error message improvements
* Added Tree.php - A HTML to Tree par ser, which can be used to process HTML,
or will eventually replace the Tree parsing code in the compiler.
tests/treeTest.php shows example usage
* HTML_Template_Flexy_Element used with <FORM> tags, now honours override property
* Minor reduction in size of parser Nodes
</notes>
</release>
<release>
<version>
<release>1.0.1</release>
<api>1.0.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2004-08-09</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor Bug Fix Release
Bugs
#------ Fix Missing include of Token.php
</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-12-18</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
Minor Feature Release
Changes
Note: This release may include some changes which may break BC, (in which case they
_are_ bugs and will be fixed.).
Features
#------ Forms without names, now are not generated as HTML_Elements, rather than given a default name.
#------ support for -ve numbers in {arrays[-1]}
#------ support for variable replacements in commented out blocks of styles