ofs | hex dump | ascii |
---|
0000 | 70 61 63 6b 61 67 65 2e 78 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | package.xml..................... |
0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0060 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
0080 | 20 20 31 31 31 35 34 20 20 37 36 33 33 36 35 32 35 31 32 20 20 20 36 33 34 35 20 00 00 00 00 00 | ..11154..7633652512...6345...... |
00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
01a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
01c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
01e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0200 | 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 49 53 | <?xml.version="1.0".encoding="IS |
0220 | 4f 2d 38 38 35 39 2d 31 22 20 3f 3e 0a 3c 70 61 63 6b 61 67 65 20 76 65 72 73 69 6f 6e 3d 22 31 | O-8859-1".?>.<package.version="1 |
0240 | 2e 30 22 3e 0a 20 20 3c 6e 61 6d 65 3e 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 3c 2f 6e | .0">...<name>HTML_Template_IT</n |
0260 | 61 6d 65 3e 0a 20 20 3c 73 75 6d 6d 61 72 79 3e 49 6e 74 65 67 72 61 74 65 64 20 54 65 6d 70 6c | ame>...<summary>Integrated.Templ |
0280 | 61 74 65 73 3c 2f 73 75 6d 6d 61 72 79 3e 0a 20 20 3c 64 65 73 63 72 69 70 74 69 6f 6e 3e 48 54 | ates</summary>...<description>HT |
02a0 | 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 3a 0a 53 69 6d 70 6c 65 20 74 65 6d 70 6c 61 74 65 20 | ML_Template_IT:.Simple.template. |
02c0 | 41 50 49 2e 0a 54 68 65 20 49 73 6f 74 65 6d 70 6c 61 74 65 20 41 50 49 20 69 73 20 73 6f 6d 65 | API..The.Isotemplate.API.is.some |
02e0 | 77 68 61 74 20 74 72 69 63 6b 79 20 66 6f 72 20 61 20 62 65 67 69 6e 6e 65 72 20 61 6c 74 68 6f | what.tricky.for.a.beginner.altho |
0300 | 75 67 68 20 69 74 20 69 73 20 74 68 65 20 62 65 73 74 0a 6f 6e 65 20 79 6f 75 20 63 61 6e 20 62 | ugh.it.is.the.best.one.you.can.b |
0320 | 75 69 6c 64 2e 20 74 65 6d 70 6c 61 74 65 3a 3a 70 61 72 73 65 28 29 20 5b 70 68 70 6c 69 62 20 | uild..template::parse().[phplib. |
0340 | 74 65 6d 70 6c 61 74 65 20 3d 20 49 73 6f 74 65 6d 70 6c 61 74 65 5d 20 72 65 71 75 65 73 74 73 | template.=.Isotemplate].requests |
0360 | 0a 79 6f 75 20 74 6f 20 6e 61 6d 65 20 61 20 73 6f 75 72 63 65 20 61 6e 64 20 61 20 74 61 72 67 | .you.to.name.a.source.and.a.targ |
0380 | 65 74 20 77 68 65 72 65 20 74 68 65 20 63 75 72 72 65 6e 74 20 62 6c 6f 63 6b 20 67 65 74 73 20 | et.where.the.current.block.gets. |
03a0 | 70 61 72 73 65 64 20 69 6e 74 6f 2e 0a 53 6f 75 72 63 65 20 61 6e 64 20 74 61 72 67 65 74 20 63 | parsed.into..Source.and.target.c |
03c0 | 61 6e 20 62 65 20 62 6c 6f 63 6b 20 6e 61 6d 65 73 20 6f 72 20 65 76 65 6e 20 68 61 6e 64 6c 65 | an.be.block.names.or.even.handle |
03e0 | 72 20 6e 61 6d 65 73 2e 20 54 68 69 73 20 41 50 49 20 67 69 76 65 73 20 79 6f 75 0a 61 20 6d 61 | r.names..This.API.gives.you.a.ma |
0400 | 78 69 6d 75 6d 20 6f 66 20 66 65 78 69 62 69 6c 69 74 79 20 62 75 74 20 79 6f 75 20 61 6c 77 61 | ximum.of.fexibility.but.you.alwa |
0420 | 79 73 20 68 61 76 65 20 74 6f 20 6b 6e 6f 77 20 77 68 61 74 20 79 6f 75 20 64 6f 20 77 68 69 63 | ys.have.to.know.what.you.do.whic |
0440 | 68 20 69 73 0a 71 75 69 74 65 20 75 6e 75 73 75 61 6c 20 66 6f 72 20 70 68 70 20 73 6b 72 69 70 | h.is.quite.unusual.for.php.skrip |
0460 | 74 65 72 20 6c 69 6b 65 20 6d 65 2e 0a 0a 49 20 6e 6f 74 69 63 65 64 20 74 68 61 74 20 49 20 64 | ter.like.me...I.noticed.that.I.d |
0480 | 6f 20 6e 6f 74 20 61 6e 79 20 63 6f 6e 74 72 6f 6c 20 6f 6e 20 77 68 69 63 68 20 62 6c 6f 63 6b | o.not.any.control.on.which.block |
04a0 | 20 67 65 74 73 20 70 61 72 73 65 64 20 69 6e 74 6f 20 77 68 69 63 68 20 6f 6e 65 2e 0a 49 66 20 | .gets.parsed.into.which.one..If. |
04c0 | 61 6c 6c 20 62 6c 6f 63 6b 73 20 61 72 65 20 77 69 74 68 69 6e 20 6f 6e 65 20 66 69 6c 65 2c 20 | all.blocks.are.within.one.file,. |
04e0 | 74 68 65 20 73 63 72 69 70 74 20 6b 6e 6f 77 73 20 68 6f 77 20 74 68 65 79 20 61 72 65 20 6e 65 | the.script.knows.how.they.are.ne |
0500 | 73 74 65 64 20 61 6e 64 20 69 6e 0a 77 68 69 63 68 20 77 61 79 20 79 6f 75 20 68 61 76 65 20 74 | sted.and.in.which.way.you.have.t |
0520 | 6f 20 70 61 72 73 65 20 74 68 65 6d 2e 20 49 54 20 6b 6e 6f 77 73 20 74 68 61 74 20 69 6e 6e 65 | o.parse.them..IT.knows.that.inne |
0540 | 72 31 20 69 73 20 61 20 63 68 69 6c 64 20 6f 66 20 62 6c 6f 63 6b 32 2c 20 74 68 65 72 65 27 73 | r1.is.a.child.of.block2,.there's |
0560 | 0a 6e 6f 20 6e 65 65 64 20 74 6f 20 74 65 6c 6c 20 68 69 6d 20 61 62 6f 75 74 20 74 68 69 73 2e | .no.need.to.tell.him.about.this. |
0580 | 0a 46 65 61 74 75 72 65 73 20 3a 0a 20 20 2a 20 4e 65 73 74 65 64 20 62 6c 6f 63 6b 73 0a 20 20 | .Features.:...*.Nested.blocks... |
05a0 | 2a 20 49 6e 63 6c 75 64 65 20 65 78 74 65 72 6e 61 6c 20 66 69 6c 65 0a 20 20 2a 20 43 75 73 74 | *.Include.external.file...*.Cust |
05c0 | 6f 6d 20 74 61 67 73 20 66 6f 72 6d 61 74 20 28 64 65 66 61 75 6c 74 20 7b 6d 79 74 61 67 7d 29 | om.tags.format.(default.{mytag}) |
05e0 | 0a 0a 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 58 20 3a 0a 57 69 74 68 20 74 68 69 73 20 | ..HTML_Template_ITX.:.With.this. |
0600 | 63 6c 61 73 73 20 79 6f 75 20 67 65 74 20 74 68 65 20 66 75 6c 6c 20 70 6f 77 65 72 20 6f 66 20 | class.you.get.the.full.power.of. |
0620 | 74 68 65 20 70 68 70 6c 69 62 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 73 73 2e 0a 59 6f 75 20 6d | the.phplib.template.class..You.m |
0640 | 61 79 20 68 61 76 65 20 6f 6e 65 20 66 69 6c 65 20 77 69 74 68 20 62 6c 6f 63 6b 73 20 69 6e 20 | ay.have.one.file.with.blocks.in. |
0660 | 69 74 20 62 75 74 20 79 6f 75 20 68 61 76 65 20 61 73 20 77 65 6c 6c 20 6f 6e 65 20 6d 61 69 6e | it.but.you.have.as.well.one.main |
0680 | 20 66 69 6c 65 0a 61 6e 64 20 6d 75 6c 74 69 70 6c 65 20 66 69 6c 65 73 20 6f 6e 65 20 66 6f 72 | .file.and.multiple.files.one.for |
06a0 | 20 65 61 63 68 20 62 6c 6f 63 6b 2e 20 54 68 69 73 20 69 73 20 71 75 69 74 65 20 75 73 65 66 75 | .each.block..This.is.quite.usefu |
06c0 | 6c 6c 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 0a 75 73 65 72 20 63 6f 6e 66 69 67 75 72 61 62 | ll.when.you.have.user.configurab |
06e0 | 6c 65 20 77 65 62 73 69 74 65 73 2e 20 55 73 69 6e 67 20 62 6c 6f 63 6b 73 20 6e 6f 74 20 69 6e | le.websites..Using.blocks.not.in |
0700 | 20 74 68 65 20 6d 61 69 6e 20 74 65 6d 70 6c 61 74 65 20 61 6c 6c 6f 77 73 0a 79 6f 75 20 74 6f | .the.main.template.allows.you.to |
0720 | 20 6d 6f 64 69 66 79 20 73 6f 6d 65 20 70 61 72 74 73 20 6f 66 20 79 6f 75 72 20 6c 61 79 6f 75 | .modify.some.parts.of.your.layou |
0740 | 74 20 65 61 73 69 6c 79 2e 3c 2f 64 65 73 63 72 69 70 74 69 6f 6e 3e 0a 20 20 3c 6d 61 69 6e 74 | t.easily.</description>...<maint |
0760 | 61 69 6e 65 72 73 3e 0a 20 20 20 20 3c 6d 61 69 6e 74 61 69 6e 65 72 3e 0a 20 20 20 20 20 20 3c | ainers>.....<maintainer>.......< |
0780 | 75 73 65 72 3e 75 77 3c 2f 75 73 65 72 3e 0a 20 20 20 20 20 20 3c 6e 61 6d 65 3e 55 6c 66 20 57 | user>uw</user>.......<name>Ulf.W |
07a0 | 65 6e 64 65 6c 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 20 20 3c 65 6d 61 69 6c 3e 75 6c 66 2e 77 65 | endel</name>.......<email>ulf.we |
07c0 | 6e 64 65 6c 40 70 68 70 64 6f 63 2e 64 65 3c 2f 65 6d 61 69 6c 3e 0a 20 20 20 20 20 20 3c 72 6f | ndel@phpdoc.de</email>.......<ro |
07e0 | 6c 65 3e 6c 65 61 64 3c 2f 72 6f 6c 65 3e 0a 20 20 20 20 3c 2f 6d 61 69 6e 74 61 69 6e 65 72 3e | le>lead</role>.....</maintainer> |
0800 | 0a 20 20 20 20 3c 6d 61 69 6e 74 61 69 6e 65 72 3e 0a 20 20 20 20 20 20 3c 75 73 65 72 3e 70 61 | .....<maintainer>.......<user>pa |
0820 | 6a 6f 79 65 3c 2f 75 73 65 72 3e 0a 20 20 20 20 20 20 3c 6e 61 6d 65 3e 50 69 65 72 72 65 2d 41 | joye</user>.......<name>Pierre-A |
0840 | 6c 61 69 6e 20 4a 6f 79 65 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 20 20 3c 65 6d 61 69 6c 3e 70 61 | lain.Joye</name>.......<email>pa |
0860 | 6a 40 70 65 61 72 66 72 2e 6f 72 67 3c 2f 65 6d 61 69 6c 3e 0a 20 20 20 20 20 20 3c 72 6f 6c 65 | j@pearfr.org</email>.......<role |
0880 | 3e 6c 65 61 64 3c 2f 72 6f 6c 65 3e 0a 20 20 20 20 3c 2f 6d 61 69 6e 74 61 69 6e 65 72 3e 0a 20 | >lead</role>.....</maintainer>.. |
08a0 | 20 3c 2f 6d 61 69 6e 74 61 69 6e 65 72 73 3e 0a 20 20 3c 72 65 6c 65 61 73 65 3e 0a 20 20 20 20 | .</maintainers>...<release>..... |
08c0 | 3c 76 65 72 73 69 6f 6e 3e 31 2e 31 3c 2f 76 65 72 73 69 6f 6e 3e 0a 20 20 20 20 3c 64 61 74 65 | <version>1.1</version>.....<date |
08e0 | 3e 32 30 30 33 2d 30 33 2d 31 31 3c 2f 64 61 74 65 3e 0a 20 20 20 20 3c 6c 69 63 65 6e 73 65 3e | >2003-03-11</date>.....<license> |
0900 | 50 48 50 20 4c 69 63 65 6e 73 65 3c 2f 6c 69 63 65 6e 73 65 3e 0a 20 20 20 20 3c 73 74 61 74 65 | PHP.License</license>.....<state |
0920 | 3e 73 74 61 62 6c 65 3c 2f 73 74 61 74 65 3e 0a 20 20 20 20 3c 6e 6f 74 65 73 3e 2d 20 41 64 64 | >stable</state>.....<notes>-.Add |
0940 | 65 64 20 73 74 72 5f 72 65 70 6c 61 63 65 20 6f 70 74 69 6f 6e 6e 61 6c 20 70 61 72 73 69 6e 67 | ed.str_replace.optionnal.parsing |
0960 | 20 28 66 69 78 65 73 20 70 72 6f 62 6c 65 6d 73 20 0a 20 20 77 69 74 68 20 72 65 67 75 6c 61 72 | .(fixes.problems....with.regular |
0980 | 20 65 78 70 72 65 73 73 69 6f 6e 20 6c 69 6b 65 20 27 24 27 20 73 79 6d 62 6f 6c 73 29 20 28 41 | .expression.like.'$'.symbols).(A |
09a0 | 6c 65 78 65 79 2c 20 70 61 6a 6f 79 65 29 0a 2d 20 41 64 64 65 64 20 70 72 65 73 65 72 76 65 5f | lexey,.pajoye).-.Added.preserve_ |
09c0 | 64 61 74 61 20 74 6f 20 73 75 62 73 74 69 74 75 74 65 2f 70 72 65 73 65 72 76 65 20 76 61 72 69 | data.to.substitute/preserve.vari |
09e0 | 61 62 6c 65 73 20 69 6e 73 69 64 65 0a 20 20 69 6e 20 64 61 74 61 73 20 61 6c 72 65 61 64 79 20 | ables.inside...in.datas.already. |
0a00 | 70 61 73 73 65 64 20 74 68 72 6f 75 67 68 20 73 65 74 56 61 72 69 61 62 6c 65 20 28 41 6c 65 78 | passed.through.setVariable.(Alex |
0a20 | 65 79 29 0a 41 20 73 70 65 63 69 61 6c 20 74 68 61 6e 6b 20 74 6f 20 41 6c 65 78 65 79 20 42 6f | ey).A.special.thank.to.Alexey.Bo |
0a40 | 72 7a 6f 76 20 74 6f 20 70 72 6f 76 69 64 65 20 61 20 70 61 74 63 68 20 66 6f 72 20 68 69 73 20 | rzov.to.provide.a.patch.for.his. |
0a60 | 66 69 78 65 73 3c 2f 6e 6f 74 65 73 3e 0a 20 20 20 20 3c 66 69 6c 65 6c 69 73 74 3e 0a 20 20 20 | fixes</notes>.....<filelist>.... |
0a80 | 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 70 68 70 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 | ...<file.role="php".baseinstalld |
0aa0 | 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 66 32 34 34 33 | ir="HTML/Template".md5sum="f2443 |
0ac0 | 37 66 65 38 61 61 61 62 63 35 37 62 35 38 35 35 30 64 36 34 61 62 34 61 37 62 31 22 20 6e 61 6d | 7fe8aaabc57b58550d64ab4a7b1".nam |
0ae0 | 65 3d 22 49 54 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 70 | e="IT.php"/>.......<file.role="p |
0b00 | 68 70 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 | hp".baseinstalldir="HTML/Templat |
0b20 | 65 22 20 6d 64 35 73 75 6d 3d 22 37 37 39 31 35 61 33 63 34 32 63 39 33 35 65 37 35 37 32 32 32 | e".md5sum="77915a3c42c935e757222 |
0b40 | 31 64 32 34 31 32 32 36 64 38 65 22 20 6e 61 6d 65 3d 22 49 54 58 2e 70 68 70 22 2f 3e 0a 20 20 | 1d241226d8e".name="ITX.php"/>... |
0b60 | 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 70 68 70 22 20 62 61 73 65 69 6e 73 74 61 6c 6c | ....<file.role="php".baseinstall |
0b80 | 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 33 64 62 38 | dir="HTML/Template".md5sum="3db8 |
0ba0 | 65 63 35 37 66 31 35 36 36 38 65 64 32 37 65 65 39 30 38 37 62 33 31 64 34 39 31 66 22 20 6e 61 | ec57f15668ed27ee9087b31d491f".na |
0bc0 | 6d 65 3d 22 49 54 5f 45 72 72 6f 72 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 | me="IT_Error.php"/>.......<file. |
0be0 | 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c | role="test".baseinstalldir="HTML |
0c00 | 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 65 35 30 64 65 34 39 62 37 34 61 31 64 | /Template".md5sum="e50de49b74a1d |
0c20 | 39 36 62 62 37 37 64 64 61 65 32 64 30 61 62 64 66 63 33 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 | 96bb77ddae2d0abdfc3".name="tests |
0c40 | 2f 74 65 6d 70 6c 61 74 65 73 2f 61 64 64 62 6c 6f 63 6b 2e 68 74 6d 6c 22 2f 3e 0a 20 20 20 20 | /templates/addblock.html"/>..... |
0c60 | 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 | ..<file.role="test".baseinstalld |
0c80 | 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 32 32 65 35 36 | ir="HTML/Template".md5sum="22e56 |
0ca0 | 34 33 37 33 37 38 65 35 33 64 30 38 62 61 30 37 64 33 64 64 32 61 61 34 62 38 35 22 20 6e 61 6d | 437378e53d08ba07d3dd2aa4b85".nam |
0cc0 | 65 3d 22 74 65 73 74 73 2f 74 65 6d 70 6c 61 74 65 73 2f 62 6c 6f 63 6b 69 74 65 72 61 74 69 6f | e="tests/templates/blockiteratio |
0ce0 | 6e 2e 68 74 6d 6c 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 | n.html"/>.......<file.role="test |
0d00 | 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 | ".baseinstalldir="HTML/Template" |
0d20 | 20 6d 64 35 73 75 6d 3d 22 34 31 37 33 62 66 39 37 65 65 63 34 33 37 38 37 35 33 32 65 32 34 37 | .md5sum="4173bf97eec43787532e247 |
0d40 | 65 66 39 62 32 36 31 31 61 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 74 65 6d 70 6c 61 74 65 73 | ef9b2611a".name="tests/templates |
0d60 | 2f 62 6c 6f 63 6b 73 2e 68 74 6d 6c 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 | /blocks.html"/>.......<file.role |
0d80 | 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d | ="test".baseinstalldir="HTML/Tem |
0da0 | 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 32 36 31 31 64 36 65 63 35 37 34 61 36 35 37 31 36 | plate".md5sum="2611d6ec574a65716 |
0dc0 | 66 31 62 63 32 63 61 39 35 63 62 38 63 36 33 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 74 65 6d | f1bc2ca95cb8c63".name="tests/tem |
0de0 | 70 6c 61 74 65 73 2f 67 6c 6f 62 61 6c 73 2e 68 74 6d 6c 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 | plates/globals.html"/>.......<fi |
0e00 | 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 | le.role="test".baseinstalldir="H |
0e20 | 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 33 31 30 35 35 32 64 62 34 36 | TML/Template".md5sum="310552db46 |
0e40 | 35 33 62 33 34 64 62 62 30 66 39 39 33 38 34 37 35 37 32 66 63 35 22 20 6e 61 6d 65 3d 22 74 65 | 53b34dbb0f993847572fc5".name="te |
0e60 | 73 74 73 2f 74 65 6d 70 6c 61 74 65 73 2f 5f 5f 69 6e 63 6c 75 64 65 2e 68 74 6d 6c 22 2f 3e 0a | sts/templates/__include.html"/>. |
0e80 | 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 | ......<file.role="test".baseinst |
0ea0 | 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 64 | alldir="HTML/Template".md5sum="d |
0ec0 | 62 35 62 32 32 36 65 66 66 30 32 31 38 63 38 33 31 37 34 39 63 30 37 30 34 32 35 32 39 66 32 22 | b5b226eff0218c831749c07042529f2" |
0ee0 | 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 74 65 6d 70 6c 61 74 65 73 2f 69 6e 63 6c 75 64 65 2e 68 | .name="tests/templates/include.h |
0f00 | 74 6d 6c 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 | tml"/>.......<file.role="test".b |
0f20 | 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 | aseinstalldir="HTML/Template".md |
0f40 | 35 73 75 6d 3d 22 64 39 61 36 34 32 35 65 65 62 64 66 63 36 39 38 31 34 36 35 62 34 61 32 32 38 | 5sum="d9a6425eebdfc6981465b4a228 |
0f60 | 64 62 65 65 35 31 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 74 65 6d 70 6c 61 74 65 73 2f 6c 6f | dbee51".name="tests/templates/lo |
0f80 | 61 64 74 65 6d 70 6c 61 74 65 66 69 6c 65 2e 68 74 6d 6c 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 | adtemplatefile.html"/>.......<fi |
0fa0 | 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 | le.role="test".baseinstalldir="H |
0fc0 | 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 35 63 37 65 32 65 39 63 33 32 | TML/Template".md5sum="5c7e2e9c32 |
0fe0 | 33 30 36 64 62 34 62 36 36 36 37 64 32 62 35 37 66 31 63 30 61 63 22 20 6e 61 6d 65 3d 22 74 65 | 306db4b6667d2b57f1c0ac".name="te |
1000 | 73 74 73 2f 74 65 6d 70 6c 61 74 65 73 2f 72 65 70 6c 61 63 65 62 6c 6f 63 6b 2e 68 74 6d 6c 22 | sts/templates/replaceblock.html" |
1020 | 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 | />.......<file.role="test".basei |
1040 | 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d | nstalldir="HTML/Template".md5sum |
1060 | 3d 22 39 62 64 39 64 39 36 34 33 36 33 39 30 34 62 35 30 32 36 39 37 32 64 66 66 30 64 31 39 38 | ="9bd9d964363904b5026972dff0d198 |
1080 | 64 61 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 43 6f 6e 73 6f 6c 65 5f 54 65 73 74 4c 69 73 74 | da".name="tests/Console_TestList |
10a0 | 65 6e 65 72 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 | ener.php"/>.......<file.role="te |
10c0 | 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 | st".baseinstalldir="HTML/Templat |
10e0 | 65 22 20 6d 64 35 73 75 6d 3d 22 65 36 32 34 62 65 34 37 61 33 36 39 34 38 61 31 65 34 34 64 32 | e".md5sum="e624be47a36948a1e44d2 |
1100 | 33 31 32 36 30 64 65 38 30 38 61 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 49 54 5f 61 70 69 5f | 31260de808a".name="tests/IT_api_ |
1120 | 74 65 73 74 63 61 73 65 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 | testcase.php"/>.......<file.role |
1140 | 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d | ="test".baseinstalldir="HTML/Tem |
1160 | 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 33 38 33 36 62 33 66 63 31 64 64 35 61 32 61 34 64 | plate".md5sum="3836b3fc1dd5a2a4d |
1180 | 30 39 32 35 38 62 65 35 37 35 37 33 36 63 39 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 49 54 5f | 09258be575736c9".name="tests/IT_ |
11a0 | 75 73 61 67 65 5f 74 65 73 74 63 61 73 65 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 20 3c 66 69 6c | usage_testcase.php"/>.......<fil |
11c0 | 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 3d 22 48 54 | e.role="test".baseinstalldir="HT |
11e0 | 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 64 35 64 34 33 36 32 65 34 37 65 | ML/Template".md5sum="d5d4362e47e |
1200 | 34 61 36 33 33 65 34 37 63 38 37 66 33 64 61 66 38 34 35 39 65 22 20 6e 61 6d 65 3d 22 74 65 73 | 4a633e47c87f3daf8459e".name="tes |
1220 | 74 73 2f 49 54 58 5f 61 70 69 5f 74 65 73 74 63 61 73 65 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 | ts/ITX_api_testcase.php"/>...... |
1240 | 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 | .<file.role="test".baseinstalldi |
1260 | 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 65 63 36 33 30 64 | r="HTML/Template".md5sum="ec630d |
1280 | 36 33 64 66 38 31 36 33 66 37 35 63 34 61 61 33 62 31 65 33 30 35 31 64 32 64 22 20 6e 61 6d 65 | 63df8163f75c4aa3b1e3051d2d".name |
12a0 | 3d 22 74 65 73 74 73 2f 49 54 58 5f 75 73 61 67 65 5f 74 65 73 74 63 61 73 65 2e 70 68 70 22 2f | ="tests/ITX_usage_testcase.php"/ |
12c0 | 3e 0a 20 20 20 20 20 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 74 65 73 74 22 20 62 61 73 65 69 6e | >.......<file.role="test".basein |
12e0 | 73 74 61 6c 6c 64 69 72 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d | stalldir="HTML/Template".md5sum= |
1300 | 22 37 61 32 63 38 65 61 62 38 34 33 64 61 66 31 63 62 39 61 63 65 62 66 64 37 66 61 35 39 31 33 | "7a2c8eab843daf1cb9acebfd7fa5913 |
1320 | 64 22 20 6e 61 6d 65 3d 22 74 65 73 74 73 2f 74 65 73 74 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 | d".name="tests/test.php"/>...... |
1340 | 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 64 6f 63 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 | .<file.role="doc".baseinstalldir |
1360 | 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 30 62 38 37 37 39 36 | ="HTML/Template".md5sum="0b87796 |
1380 | 64 62 63 65 66 39 34 36 64 66 36 32 64 39 61 36 38 65 39 32 38 61 63 38 30 22 20 6e 61 6d 65 3d | dbcef946df62d9a68e928ac80".name= |
13a0 | 22 65 78 61 6d 70 6c 65 73 2f 73 61 6d 70 6c 65 5f 69 74 2e 70 68 70 22 2f 3e 0a 20 20 20 20 20 | "examples/sample_it.php"/>...... |
13c0 | 20 3c 66 69 6c 65 20 72 6f 6c 65 3d 22 64 6f 63 22 20 62 61 73 65 69 6e 73 74 61 6c 6c 64 69 72 | .<file.role="doc".baseinstalldir |
13e0 | 3d 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 22 20 6d 64 35 73 75 6d 3d 22 38 33 34 65 31 65 36 | ="HTML/Template".md5sum="834e1e6 |
1400 | 64 34 30 62 32 66 33 34 39 30 36 61 61 31 37 66 39 39 36 39 62 64 38 39 31 22 20 6e 61 6d 65 3d | d40b2f34906aa17f9969bd891".name= |
1420 | 22 65 78 61 6d 70 6c 65 73 2f 74 65 6d 70 6c 61 74 65 73 2f 6d 61 69 6e 2e 74 70 6c 2e 68 74 6d | "examples/templates/main.tpl.htm |
1440 | 22 2f 3e 0a 20 20 20 20 3c 2f 66 69 6c 65 6c 69 73 74 3e 0a 20 20 3c 2f 72 65 6c 65 61 73 65 3e | "/>.....</filelist>...</release> |
1460 | 0a 3c 2f 70 61 63 6b 61 67 65 3e 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .</package>..................... |
1480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1600 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 49 54 2e 70 68 70 00 00 00 00 00 | HTML_Template_IT-1.1/IT.php..... |
1620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1660 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
1680 | 20 20 37 35 33 37 37 20 20 37 36 33 33 35 31 35 32 31 34 20 20 31 30 35 36 33 20 00 00 00 00 00 | ..75377..7633515214..10563...... |
16a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1800 | 3c 3f 70 68 70 0a 2f 2f 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | <?php.//.//.+------------------- |
1820 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
1840 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 20 7c 20 50 48 50 20 56 65 | -------------------+.//.|.PHP.Ve |
1860 | 72 73 69 6f 6e 20 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rsion.4......................... |
1880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c | ...............................| |
18a0 | 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | .//.+--------------------------- |
18c0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
18e0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 20 7c 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 | -----------+.//.|.Copyright.(c). |
1900 | 31 39 39 37 2d 32 30 30 33 20 54 68 65 20 50 48 50 20 47 72 6f 75 70 20 20 20 20 20 20 20 20 20 | 1997-2003.The.PHP.Group......... |
1920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d | .......................|.//.+--- |
1940 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
1960 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
1980 | 2d 2d 2d 2b 0a 2f 2f 20 7c 20 54 68 69 73 20 73 6f 75 72 63 65 20 66 69 6c 65 20 69 73 20 73 75 | ---+.//.|.This.source.file.is.su |
19a0 | 62 6a 65 63 74 20 74 6f 20 76 65 72 73 69 6f 6e 20 32 2e 30 32 20 6f 66 20 74 68 65 20 50 48 50 | bject.to.version.2.02.of.the.PHP |
19c0 | 20 6c 69 63 65 6e 73 65 2c 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 74 68 61 74 20 69 73 20 62 75 | .license,......|.//.|.that.is.bu |
19e0 | 6e 64 6c 65 64 20 77 69 74 68 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 69 6e 20 74 68 65 20 66 | ndled.with.this.package.in.the.f |
1a00 | 69 6c 65 20 4c 49 43 45 4e 53 45 2c 20 61 6e 64 20 69 73 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 | ile.LICENSE,.and.is........|.//. |
1a20 | 7c 20 61 76 61 69 6c 61 62 6c 65 20 61 74 20 74 68 72 6f 75 67 68 20 74 68 65 20 77 6f 72 6c 64 | |.available.at.through.the.world |
1a40 | 2d 77 69 64 65 2d 77 65 62 20 61 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | -wide-web.at.................... |
1a60 | 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 68 74 74 70 3a 2f 2f 77 77 77 2e 70 68 70 2e 6e 65 74 | .......|.//.|.http://www.php.net |
1a80 | 2f 6c 69 63 65 6e 73 65 2f 32 5f 30 32 2e 74 78 74 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /license/2_02.txt............... |
1aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 49 66 20 79 6f 75 | ...................|.//.|.If.you |
1ac0 | 20 64 69 64 20 6e 6f 74 20 72 65 63 65 69 76 65 20 61 20 63 6f 70 79 20 6f 66 20 74 68 65 20 50 | .did.not.receive.a.copy.of.the.P |
1ae0 | 48 50 20 6c 69 63 65 6e 73 65 20 61 6e 64 20 61 72 65 20 75 6e 61 62 6c 65 20 74 6f 20 20 20 7c | HP.license.and.are.unable.to...| |
1b00 | 0a 2f 2f 20 7c 20 6f 62 74 61 69 6e 20 69 74 20 74 68 72 6f 75 67 68 20 74 68 65 20 77 6f 72 6c | .//.|.obtain.it.through.the.worl |
1b20 | 64 2d 77 69 64 65 2d 77 65 62 2c 20 70 6c 65 61 73 65 20 73 65 6e 64 20 61 20 6e 6f 74 65 20 74 | d-wide-web,.please.send.a.note.t |
1b40 | 6f 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 6c 69 63 65 6e 73 65 40 70 68 70 2e 6e 65 | o..........|.//.|.license@php.ne |
1b60 | 74 20 73 6f 20 77 65 20 63 61 6e 20 6d 61 69 6c 20 79 6f 75 20 61 20 63 6f 70 79 20 69 6d 6d 65 | t.so.we.can.mail.you.a.copy.imme |
1b80 | 64 69 61 74 65 6c 79 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d | diately................|.//.+--- |
1ba0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
1bc0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
1be0 | 2d 2d 2d 2b 0a 2f 2f 20 7c 20 41 75 74 68 6f 72 3a 20 55 6c 66 20 57 65 6e 64 65 6c 20 3c 75 6c | ---+.//.|.Author:.Ulf.Wendel.<ul |
1c00 | 66 2e 77 65 6e 64 65 6c 40 70 68 70 64 6f 63 2e 64 65 3e 20 20 20 20 20 20 20 20 20 20 20 20 20 | f.wendel@phpdoc.de>............. |
1c20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ...............|.//.+----------- |
1c40 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
1c60 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 0a | ---------------------------+.//. |
1c80 | 2f 2f 20 24 49 64 3a 20 49 54 2e 70 68 70 2c 76 20 31 2e 36 20 32 30 30 33 2f 30 33 2f 31 32 20 | //.$Id:.IT.php,v.1.6.2003/03/12. |
1ca0 | 30 32 3a 32 35 3a 31 36 20 70 61 6a 6f 79 65 20 45 78 70 20 24 0a 2f 2f 0a 0a 72 65 71 75 69 72 | 02:25:16.pajoye.Exp.$.//..requir |
1cc0 | 65 5f 6f 6e 63 65 28 27 50 45 41 52 2e 70 68 70 27 29 3b 0a 0a 64 65 66 69 6e 65 28 22 49 54 5f | e_once('PEAR.php');..define("IT_ |
1ce0 | 4f 4b 22 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 29 3b | OK",.........................1); |
1d00 | 0a 64 65 66 69 6e 65 28 22 49 54 5f 45 52 52 4f 52 22 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 | .define("IT_ERROR",............. |
1d20 | 20 20 20 20 20 20 20 20 2d 31 29 3b 0a 64 65 66 69 6e 65 28 22 49 54 5f 54 50 4c 5f 4e 4f 54 5f | ........-1);.define("IT_TPL_NOT_ |
1d40 | 46 4f 55 4e 44 22 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 32 29 3b 0a 64 65 66 69 6e 65 28 | FOUND",.............-2);.define( |
1d60 | 22 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e 44 22 2c 20 20 20 20 20 20 20 20 20 20 20 | "IT_BLOCK_NOT_FOUND",........... |
1d80 | 2d 33 29 3b 0a 64 65 66 69 6e 65 28 22 49 54 5f 42 4c 4f 43 4b 5f 44 55 50 4c 49 43 41 54 45 22 | -3);.define("IT_BLOCK_DUPLICATE" |
1da0 | 2c 20 20 20 20 20 20 20 20 20 20 20 2d 34 29 3b 0a 64 65 66 69 6e 65 28 27 49 54 5f 55 4e 4b 4e | ,...........-4);.define('IT_UNKN |
1dc0 | 4f 57 4e 5f 4f 50 54 49 4f 4e 27 2c 20 20 20 20 20 20 20 20 20 20 20 20 2d 36 29 3b 0a 2f 2a 2a | OWN_OPTION',............-6);./** |
1de0 | 0a 20 2a 20 49 6e 74 65 67 72 61 74 65 64 20 54 65 6d 70 6c 61 74 65 20 2d 20 49 54 0a 20 2a 0a | ..*.Integrated.Template.-.IT..*. |
1e00 | 20 2a 20 57 65 6c 6c 20 74 68 65 72 65 27 73 20 6e 6f 74 20 6d 75 63 68 20 74 6f 20 73 61 79 20 | .*.Well.there's.not.much.to.say. |
1e20 | 61 62 6f 75 74 20 69 74 2e 20 49 20 6e 65 65 64 65 64 20 61 20 74 65 6d 70 6c 61 74 65 20 63 6c | about.it..I.needed.a.template.cl |
1e40 | 61 73 73 20 74 68 61 74 0a 20 2a 20 73 75 70 70 6f 72 74 73 20 61 20 73 69 6e 67 6c 65 20 74 65 | ass.that..*.supports.a.single.te |
1e60 | 6d 70 6c 61 74 65 20 66 69 6c 65 20 77 69 74 68 20 6d 75 6c 74 69 70 6c 65 20 28 6e 65 73 74 65 | mplate.file.with.multiple.(neste |
1e80 | 64 29 20 62 6c 6f 63 6b 73 20 69 6e 73 69 64 65 20 61 6e 64 0a 20 2a 20 61 20 73 69 6d 70 6c 65 | d).blocks.inside.and..*.a.simple |
1ea0 | 20 62 6c 6f 63 6b 20 41 50 49 2e 0a 20 2a 0a 20 2a 20 54 68 65 20 49 73 6f 74 65 6d 70 6c 61 74 | .block.API...*..*.The.Isotemplat |
1ec0 | 65 20 41 50 49 20 69 73 20 73 6f 6d 65 77 68 61 74 20 74 72 69 63 6b 79 20 66 6f 72 20 61 20 62 | e.API.is.somewhat.tricky.for.a.b |
1ee0 | 65 67 69 6e 6e 65 72 20 61 6c 74 68 6f 75 67 68 20 69 74 20 69 73 20 74 68 65 20 62 65 73 74 0a | eginner.although.it.is.the.best. |
1f00 | 20 2a 20 6f 6e 65 20 79 6f 75 20 63 61 6e 20 62 75 69 6c 64 2e 20 74 65 6d 70 6c 61 74 65 3a 3a | .*.one.you.can.build..template:: |
1f20 | 70 61 72 73 65 28 29 20 5b 70 68 70 6c 69 62 20 74 65 6d 70 6c 61 74 65 20 3d 20 49 73 6f 74 65 | parse().[phplib.template.=.Isote |
1f40 | 6d 70 6c 61 74 65 5d 20 72 65 71 75 65 73 74 73 0a 20 2a 20 79 6f 75 20 74 6f 20 6e 61 6d 65 20 | mplate].requests..*.you.to.name. |
1f60 | 61 20 73 6f 75 72 63 65 20 61 6e 64 20 61 20 74 61 72 67 65 74 20 77 68 65 72 65 20 74 68 65 20 | a.source.and.a.target.where.the. |
1f80 | 63 75 72 72 65 6e 74 20 62 6c 6f 63 6b 20 67 65 74 73 20 70 61 72 73 65 64 20 69 6e 74 6f 2e 0a | current.block.gets.parsed.into.. |
1fa0 | 20 2a 20 53 6f 75 72 63 65 20 61 6e 64 20 74 61 72 67 65 74 20 63 61 6e 20 62 65 20 62 6c 6f 63 | .*.Source.and.target.can.be.bloc |
1fc0 | 6b 20 6e 61 6d 65 73 20 6f 72 20 65 76 65 6e 20 68 61 6e 64 6c 65 72 20 6e 61 6d 65 73 2e 20 54 | k.names.or.even.handler.names..T |
1fe0 | 68 69 73 20 41 50 49 20 67 69 76 65 73 20 79 6f 75 0a 20 2a 20 61 20 6d 61 78 69 6d 75 6d 20 6f | his.API.gives.you..*.a.maximum.o |
2000 | 66 20 66 65 78 69 62 69 6c 69 74 79 20 62 75 74 20 79 6f 75 20 61 6c 77 61 79 73 20 68 61 76 65 | f.fexibility.but.you.always.have |
2020 | 20 74 6f 20 6b 6e 6f 77 20 77 68 61 74 20 79 6f 75 20 64 6f 20 77 68 69 63 68 20 69 73 0a 20 2a | .to.know.what.you.do.which.is..* |
2040 | 20 71 75 69 74 65 20 75 6e 75 73 75 61 6c 20 66 6f 72 20 70 68 70 20 73 6b 72 69 70 74 65 72 20 | .quite.unusual.for.php.skripter. |
2060 | 6c 69 6b 65 20 6d 65 2e 0a 20 2a 0a 20 2a 20 49 20 6e 6f 74 69 63 65 64 20 74 68 61 74 20 49 20 | like.me...*..*.I.noticed.that.I. |
2080 | 64 6f 20 6e 6f 74 20 61 6e 79 20 63 6f 6e 74 72 6f 6c 20 6f 6e 20 77 68 69 63 68 20 62 6c 6f 63 | do.not.any.control.on.which.bloc |
20a0 | 6b 20 67 65 74 73 20 70 61 72 73 65 64 20 69 6e 74 6f 20 77 68 69 63 68 20 6f 6e 65 2e 0a 20 2a | k.gets.parsed.into.which.one...* |
20c0 | 20 49 66 20 61 6c 6c 20 62 6c 6f 63 6b 73 20 61 72 65 20 77 69 74 68 69 6e 20 6f 6e 65 20 66 69 | .If.all.blocks.are.within.one.fi |
20e0 | 6c 65 2c 20 74 68 65 20 73 63 72 69 70 74 20 6b 6e 6f 77 73 20 68 6f 77 20 74 68 65 79 20 61 72 | le,.the.script.knows.how.they.ar |
2100 | 65 20 6e 65 73 74 65 64 20 61 6e 64 20 69 6e 0a 20 2a 20 77 68 69 63 68 20 77 61 79 20 79 6f 75 | e.nested.and.in..*.which.way.you |
2120 | 20 68 61 76 65 20 74 6f 20 70 61 72 73 65 20 74 68 65 6d 2e 20 49 54 20 6b 6e 6f 77 73 20 74 68 | .have.to.parse.them..IT.knows.th |
2140 | 61 74 20 69 6e 6e 65 72 31 20 69 73 20 61 20 63 68 69 6c 64 20 6f 66 20 62 6c 6f 63 6b 32 2c 20 | at.inner1.is.a.child.of.block2,. |
2160 | 74 68 65 72 65 27 73 0a 20 2a 20 6e 6f 20 6e 65 65 64 20 74 6f 20 74 65 6c 6c 20 68 69 6d 20 61 | there's..*.no.need.to.tell.him.a |
2180 | 62 6f 75 74 20 74 68 69 73 2e 0a 20 2a 0a 20 2a 20 3c 74 61 62 6c 65 20 62 6f 72 64 65 72 3e 0a | bout.this...*..*.<table.border>. |
21a0 | 20 2a 20 20 20 3c 74 72 3e 0a 20 2a 20 20 20 20 20 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 32 3e 0a | .*...<tr>..*.....<td.colspan=2>. |
21c0 | 20 2a 20 20 20 20 20 20 20 5f 5f 67 6c 6f 62 61 6c 5f 5f 0a 20 2a 20 20 20 20 20 20 20 3c 70 3e | .*.......__global__..*.......<p> |
21e0 | 0a 20 2a 20 20 20 20 20 20 20 28 68 69 64 64 65 6e 20 61 6e 64 20 61 75 74 6f 6d 61 74 69 63 61 | ..*.......(hidden.and.automatica |
2200 | 6c 6c 79 20 61 64 64 65 64 29 0a 20 2a 20 20 20 20 20 3c 2f 74 64 3e 0a 20 2a 20 20 20 3c 2f 74 | lly.added)..*.....</td>..*...</t |
2220 | 72 3e 0a 20 2a 20 20 20 3c 74 72 3e 0a 20 2a 20 20 20 20 20 3c 74 64 3e 62 6c 6f 63 6b 31 3c 2f | r>..*...<tr>..*.....<td>block1</ |
2240 | 74 64 3e 0a 20 2a 20 20 20 20 20 3c 74 64 3e 0a 20 2a 20 20 20 20 20 20 20 3c 74 61 62 6c 65 20 | td>..*.....<td>..*.......<table. |
2260 | 62 6f 72 64 65 72 3e 0a 20 2a 20 20 20 20 20 20 20 20 20 3c 74 72 3e 0a 20 2a 20 20 20 20 20 20 | border>..*.........<tr>..*...... |
2280 | 20 20 20 20 20 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 32 3e 62 6c 6f 63 6b 32 3c 2f 74 64 3e 0a 20 | .....<td.colspan=2>block2</td>.. |
22a0 | 2a 20 20 20 20 20 20 20 20 20 3c 2f 74 72 3e 0a 20 2a 20 20 20 20 20 20 20 20 20 3c 74 72 3e 0a | *.........</tr>..*.........<tr>. |
22c0 | 20 2a 20 20 20 20 20 20 20 20 20 20 20 3c 74 64 3e 69 6e 6e 65 72 31 3c 2f 74 64 3e 0a 20 2a 20 | .*...........<td>inner1</td>..*. |
22e0 | 20 20 20 20 20 20 20 20 20 20 3c 74 64 3e 69 6e 6e 65 72 32 3c 2f 74 64 3e 0a 20 2a 20 20 20 20 | ..........<td>inner2</td>..*.... |
2300 | 20 20 20 20 20 3c 2f 74 72 3e 0a 20 2a 20 20 20 20 20 20 20 3c 2f 74 61 62 6c 65 3e 0a 20 2a 20 | .....</tr>..*.......</table>..*. |
2320 | 20 20 20 20 3c 2f 74 64 3e 0a 20 2a 20 20 20 3c 2f 74 72 3e 0a 20 2a 20 3c 2f 74 61 62 6c 65 3e | ....</td>..*...</tr>..*.</table> |
2340 | 0a 20 2a 0a 20 2a 20 54 6f 20 61 64 64 20 63 6f 6e 74 65 6e 74 20 74 6f 20 62 6c 6f 63 6b 31 20 | ..*..*.To.add.content.to.block1. |
2360 | 79 6f 75 20 73 69 6d 70 6c 79 20 74 79 70 65 3a 0a 20 2a 20 3c 63 6f 64 65 3e 24 74 70 6c 2d 3e | you.simply.type:..*.<code>$tpl-> |
2380 | 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 22 62 6c 6f 63 6b 31 22 29 3b 3c 2f 63 6f 64 65 | setCurrentBlock("block1");</code |
23a0 | 3e 0a 20 2a 20 61 6e 64 20 72 65 70 65 61 74 20 74 68 69 73 20 61 73 20 6f 66 74 65 6e 20 61 73 | >..*.and.repeat.this.as.often.as |
23c0 | 20 6e 65 65 64 65 64 3a 0a 20 2a 20 3c 63 6f 64 65 3e 0a 20 2a 20 20 20 24 74 70 6c 2d 3e 73 65 | .needed:..*.<code>..*...$tpl->se |
23e0 | 74 56 61 72 69 61 62 6c 65 28 2e 2e 2e 29 3b 0a 20 2a 20 20 20 24 74 70 6c 2d 3e 70 61 72 73 65 | tVariable(...);..*...$tpl->parse |
2400 | 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 29 3b 0a 20 2a 20 3c 2f 63 6f 64 65 3e 0a 20 2a 0a 20 2a | CurrentBlock();..*.</code>..*..* |
2420 | 20 54 6f 20 61 64 64 20 63 6f 6e 74 65 6e 74 20 74 6f 20 62 6c 6f 63 6b 32 20 79 6f 75 20 77 6f | .To.add.content.to.block2.you.wo |
2440 | 75 6c 64 20 74 79 70 65 20 73 6f 6d 65 74 68 69 6e 67 20 6c 69 6b 65 3a 0a 20 2a 20 3c 63 6f 64 | uld.type.something.like:..*.<cod |
2460 | 65 3e 0a 20 2a 20 24 74 70 6c 2d 3e 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 22 69 6e 6e | e>..*.$tpl->setCurrentBlock("inn |
2480 | 65 72 31 22 29 3b 0a 20 2a 20 24 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 2e 2e 2e 29 | er1");..*.$tpl->setVariable(...) |
24a0 | 3b 0a 20 2a 20 24 74 70 6c 2d 3e 70 61 72 73 65 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 29 3b 0a | ;..*.$tpl->parseCurrentBlock();. |
24c0 | 20 2a 0a 20 2a 20 24 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 2e 2e 2e 29 3b 0a 20 2a | .*..*.$tpl->setVariable(...);..* |
24e0 | 20 24 74 70 6c 2d 3e 70 61 72 73 65 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 29 3b 0a 20 2a 0a 20 | .$tpl->parseCurrentBlock();..*.. |
2500 | 2a 20 24 74 70 6c 2d 3e 70 61 72 73 65 28 22 62 6c 6f 63 6b 31 22 29 3b 0a 20 2a 20 3c 2f 63 6f | *.$tpl->parse("block1");..*.</co |
2520 | 64 65 3e 0a 20 2a 0a 20 2a 20 54 68 69 73 20 77 69 6c 6c 20 72 65 73 75 6c 74 20 69 6e 20 6f 6e | de>..*..*.This.will.result.in.on |
2540 | 65 20 72 65 70 69 74 69 6f 6e 20 6f 66 20 62 6c 6f 63 6b 31 20 77 68 69 63 68 20 63 6f 6e 74 61 | e.repition.of.block1.which.conta |
2560 | 69 6e 73 20 74 77 6f 20 72 65 70 69 74 69 6f 6e 73 0a 20 2a 20 6f 66 20 69 6e 6e 65 72 31 2e 20 | ins.two.repitions..*.of.inner1.. |
2580 | 69 6e 6e 65 72 32 20 77 69 6c 6c 20 62 65 20 72 65 6d 6f 76 65 64 20 69 66 20 24 72 65 6d 6f 76 | inner2.will.be.removed.if.$remov |
25a0 | 65 45 6d 70 74 79 42 6c 6f 63 6b 20 69 73 20 73 65 74 20 74 6f 20 74 72 75 65 20 77 68 69 63 68 | eEmptyBlock.is.set.to.true.which |
25c0 | 20 69 73 20 74 68 65 20 64 65 66 61 75 6c 74 2e 0a 20 2a 0a 20 2a 20 55 73 61 67 65 3a 0a 20 2a | .is.the.default...*..*.Usage:..* |
25e0 | 20 3c 63 6f 64 65 3e 0a 20 2a 20 24 74 70 6c 20 3d 20 6e 65 77 20 48 54 4d 4c 5f 54 65 6d 70 6c | .<code>..*.$tpl.=.new.HTML_Templ |
2600 | 61 74 65 5f 49 54 28 20 5b 73 74 72 69 6e 67 20 66 69 6c 65 72 6f 6f 74 64 69 72 5d 20 29 3b 0a | ate_IT(.[string.filerootdir].);. |
2620 | 20 2a 0a 20 2a 20 2f 2f 20 6c 6f 61 64 20 61 20 74 65 6d 70 6c 61 74 65 20 6f 72 20 73 65 74 20 | .*..*.//.load.a.template.or.set. |
2640 | 69 74 20 77 69 74 68 20 73 65 74 54 65 6d 70 6c 61 74 65 28 29 0a 20 2a 20 24 74 70 6c 2d 3e 6c | it.with.setTemplate()..*.$tpl->l |
2660 | 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 6c 65 28 20 73 74 72 69 6e 67 20 66 69 6c 65 6e 61 6d 65 | oadTemplatefile(.string.filename |
2680 | 20 5b 2c 20 62 6f 6f 6c 65 61 6e 20 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 72 69 61 62 6c | .[,.boolean.removeUnknownVariabl |
26a0 | 65 73 2c 20 62 6f 6f 6c 65 61 6e 20 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 5d 20 29 | es,.boolean.removeEmptyBlocks].) |
26c0 | 0a 20 2a 0a 20 2a 20 2f 2f 20 73 65 74 20 22 67 6c 6f 62 61 6c 22 20 56 61 72 69 61 62 6c 65 73 | ..*..*.//.set."global".Variables |
26e0 | 20 6d 65 61 6e 69 6e 67 20 76 61 72 69 61 62 6c 65 73 20 6e 6f 74 20 62 65 65 69 6e 67 20 77 69 | .meaning.variables.not.beeing.wi |
2700 | 74 68 69 6e 20 61 20 28 69 6e 6e 65 72 29 20 62 6c 6f 63 6b 0a 20 2a 20 24 74 70 6c 2d 3e 73 65 | thin.a.(inner).block..*.$tpl->se |
2720 | 74 56 61 72 69 61 62 6c 65 28 20 73 74 72 69 6e 67 20 76 61 72 69 61 62 6c 65 6e 61 6d 65 2c 20 | tVariable(.string.variablename,. |
2740 | 6d 69 78 65 64 20 76 61 6c 75 65 20 29 3b 0a 20 2a 0a 20 2a 20 2f 2f 20 6c 69 6b 65 20 77 69 74 | mixed.value.);..*..*.//.like.wit |
2760 | 68 20 74 68 65 20 49 73 6f 74 65 6d 70 6c 61 74 65 73 20 74 68 65 72 65 27 73 20 61 20 73 65 63 | h.the.Isotemplates.there's.a.sec |
2780 | 6f 6e 64 20 77 61 79 20 74 6f 20 75 73 65 20 73 65 74 56 61 72 69 61 62 6c 65 28 29 0a 20 2a 20 | ond.way.to.use.setVariable()..*. |
27a0 | 24 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 20 61 72 72 61 79 20 28 20 73 74 72 69 6e | $tpl->setVariable(.array.(.strin |
27c0 | 67 20 76 61 72 6e 61 6d 65 20 3d 3e 20 6d 69 78 65 64 20 76 61 6c 75 65 20 29 20 29 3b 0a 20 2a | g.varname.=>.mixed.value.).);..* |
27e0 | 0a 20 2a 20 2f 2f 20 4c 65 74 27 73 20 75 73 65 20 61 6e 79 20 62 6c 6f 63 6b 2c 20 65 76 65 6e | ..*.//.Let's.use.any.block,.even |
2800 | 20 61 20 64 65 65 70 6c 79 20 6e 65 73 74 65 64 20 6f 6e 65 0a 20 2a 20 24 74 70 6c 2d 3e 73 65 | .a.deeply.nested.one..*.$tpl->se |
2820 | 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 20 73 74 72 69 6e 67 20 62 6c 6f 63 6b 6e 61 6d 65 20 | tCurrentBlock(.string.blockname. |
2840 | 29 3b 0a 20 2a 0a 20 2a 20 2f 2f 20 72 65 70 65 61 74 20 74 68 69 73 20 61 73 20 6f 66 74 65 6e | );..*..*.//.repeat.this.as.often |
2860 | 20 61 73 20 79 6f 75 20 6e 65 65 64 20 69 74 2e 0a 20 2a 20 24 74 70 6c 2d 3e 73 65 74 56 61 72 | .as.you.need.it...*.$tpl->setVar |
2880 | 69 61 62 6c 65 28 20 61 72 72 61 79 20 28 20 73 74 72 69 6e 67 20 76 61 72 6e 61 6d 65 20 3d 3e | iable(.array.(.string.varname.=> |
28a0 | 20 6d 69 78 65 64 20 76 61 6c 75 65 20 29 20 29 3b 0a 20 2a 20 24 74 70 6c 2d 3e 70 61 72 73 65 | .mixed.value.).);..*.$tpl->parse |
28c0 | 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 29 3b 0a 20 2a 0a 20 2a 20 2f 2f 20 67 65 74 20 74 68 65 | CurrentBlock();..*..*.//.get.the |
28e0 | 20 70 61 72 73 65 64 20 74 65 6d 70 6c 61 74 65 20 6f 72 20 70 72 69 6e 74 20 69 74 3a 20 24 74 | .parsed.template.or.print.it:.$t |
2900 | 70 6c 2d 3e 73 68 6f 77 28 29 0a 20 2a 20 24 74 70 6c 2d 3e 67 65 74 28 29 3b 0a 20 2a 20 3c 2f | pl->show()..*.$tpl->get();..*.</ |
2920 | 63 6f 64 65 3e 0a 20 2a 0a 20 2a 20 40 61 75 74 68 6f 72 20 20 20 55 6c 66 20 57 65 6e 64 65 6c | code>..*..*.@author...Ulf.Wendel |
2940 | 20 3c 75 77 40 6e 65 74 75 73 65 2e 64 65 3e 0a 20 2a 20 40 76 65 72 73 69 6f 6e 20 20 24 49 64 | .<uw@netuse.de>..*.@version..$Id |
2960 | 3a 20 49 54 2e 70 68 70 2c 76 20 31 2e 36 20 32 30 30 33 2f 30 33 2f 31 32 20 30 32 3a 32 35 3a | :.IT.php,v.1.6.2003/03/12.02:25: |
2980 | 31 36 20 70 61 6a 6f 79 65 20 45 78 70 20 24 0a 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 | 16.pajoye.Exp.$..*.@access...pub |
29a0 | 6c 69 63 0a 20 2a 20 40 70 61 63 6b 61 67 65 20 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 | lic..*.@package..HTML_Template_I |
29c0 | 54 0a 20 2a 2f 0a 63 6c 61 73 73 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 20 7b 0a 0a | T..*/.class.HTML_Template_IT.{.. |
29e0 | 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6f 6e 74 61 69 6e 73 20 74 68 65 20 65 72 72 6f | ..../**......*.Contains.the.erro |
2a00 | 72 20 6f 62 6a 65 63 74 73 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 61 72 72 61 79 | r.objects......*.@var......array |
2a20 | 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 | ......*.@access...public......*. |
2a40 | 40 73 65 65 20 20 20 20 20 20 68 61 6c 74 28 29 2c 20 24 70 72 69 6e 74 45 72 72 6f 72 2c 20 24 | @see......halt(),.$printError,.$ |
2a60 | 68 61 6c 74 4f 6e 45 72 72 6f 72 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 65 72 72 | haltOnError......*/.....var.$err |
2a80 | 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6c 65 61 | .=.array();....../**......*.Clea |
2aa0 | 72 20 63 61 63 68 65 20 6f 6e 20 67 65 74 28 29 3f 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 | r.cache.on.get()?......*.@var... |
2ac0 | 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 63 6c 65 61 | ...boolean......*/.....var.$clea |
2ae0 | 72 43 61 63 68 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 | rCache.=.false;....../**......*. |
2b00 | 46 69 72 73 74 20 63 68 61 72 61 63 74 65 72 20 6f 66 20 61 20 76 61 72 69 61 62 6c 65 20 70 6c | First.character.of.a.variable.pl |
2b20 | 61 63 65 68 6f 6c 64 65 72 20 28 20 5f 7b 5f 56 41 52 49 41 42 4c 45 7d 20 29 2e 0a 20 20 20 20 | aceholder.(._{_VARIABLE}.)...... |
2b40 | 20 2a 20 40 76 61 72 20 20 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 20 40 61 63 63 65 | .*.@var......string......*.@acce |
2b60 | 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 24 63 6c | ss...public......*.@see......$cl |
2b80 | 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 20 24 62 6c 6f 63 6b 6e 61 6d 65 52 65 67 45 78 70 | osingDelimiter,.$blocknameRegExp |
2ba0 | 2c 20 24 76 61 72 69 61 62 6c 65 6e 61 6d 65 52 65 67 45 78 70 0a 20 20 20 20 20 2a 2f 0a 20 20 | ,.$variablenameRegExp......*/... |
2bc0 | 20 20 76 61 72 20 24 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 3d 20 22 7b 22 3b 0a 0a | ..var.$openingDelimiter.=."{";.. |
2be0 | 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 4c 61 73 74 20 63 68 61 72 61 63 74 65 72 20 6f 66 | ..../**......*.Last.character.of |
2c00 | 20 61 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 28 20 7b 56 41 52 49 41 | .a.variable.placeholder.(.{VARIA |
2c20 | 42 4c 45 5f 7d 5f 20 29 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 73 74 72 69 6e | BLE_}_.).......*.@var......strin |
2c40 | 67 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a | g......*.@access...public......* |
2c60 | 20 40 73 65 65 20 20 20 20 20 20 24 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 20 24 62 | .@see......$openingDelimiter,.$b |
2c80 | 6c 6f 63 6b 6e 61 6d 65 52 65 67 45 78 70 2c 20 24 76 61 72 69 61 62 6c 65 6e 61 6d 65 52 65 67 | locknameRegExp,.$variablenameReg |
2ca0 | 45 78 70 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 63 6c 6f 73 69 6e 67 44 65 6c 69 | Exp......*/.....var.$closingDeli |
2cc0 | 6d 69 74 65 72 20 20 20 20 20 3d 20 22 7d 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a | miter.....=."}";....../**......* |
2ce0 | 20 52 65 67 45 78 70 20 6d 61 74 63 68 69 6e 67 20 61 20 62 6c 6f 63 6b 20 69 6e 20 74 68 65 20 | .RegExp.matching.a.block.in.the. |
2d00 | 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 20 2a 20 50 65 72 20 64 65 66 61 75 6c 74 20 22 73 6d | template.......*.Per.default."sm |
2d20 | 22 20 69 73 20 75 73 65 64 20 61 73 20 74 68 65 20 72 65 67 65 78 70 20 6d 6f 64 69 66 69 65 72 | ".is.used.as.the.regexp.modifier |
2d40 | 2c 20 22 69 22 20 69 73 20 6d 69 73 73 69 6e 67 2e 0a 20 20 20 20 20 2a 20 54 68 61 74 20 6d 65 | ,."i".is.missing.......*.That.me |
2d60 | 61 6e 73 20 61 20 63 61 73 65 20 73 65 6e 73 69 74 69 76 65 20 73 65 61 72 63 68 20 69 73 20 64 | ans.a.case.sensitive.search.is.d |
2d80 | 6f 6e 65 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 | one.......*.@var......string.... |
2da0 | 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 | ..*.@access...public......*.@see |
2dc0 | 20 20 20 20 20 20 24 76 61 72 69 61 62 6c 65 6e 61 6d 65 52 65 67 45 78 70 2c 20 24 6f 70 65 6e | ......$variablenameRegExp,.$open |
2de0 | 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 20 24 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 0a | ingDelimiter,.$closingDelimiter. |
2e00 | 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 62 6c 6f 63 6b 6e 61 6d 65 52 65 67 45 78 70 | .....*/.....var.$blocknameRegExp |
2e20 | 20 20 20 20 3d 20 22 5b 30 2d 39 41 2d 5a 61 2d 7a 5f 2d 5d 2b 22 3b 0a 0a 20 20 20 20 2f 2a 2a | ....=."[0-9A-Za-z_-]+";....../** |
2e40 | 0a 20 20 20 20 20 2a 20 52 65 67 45 78 70 20 6d 61 74 63 68 69 6e 67 20 61 20 76 61 72 69 61 62 | ......*.RegExp.matching.a.variab |
2e60 | 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e 0a | le.placeholder.in.the.template.. |
2e80 | 20 20 20 20 20 2a 20 50 65 72 20 64 65 66 61 75 6c 74 20 22 73 6d 22 20 69 73 20 75 73 65 64 20 | .....*.Per.default."sm".is.used. |
2ea0 | 61 73 20 74 68 65 20 72 65 67 65 78 70 20 6d 6f 64 69 66 69 65 72 2c 20 22 69 22 20 69 73 20 6d | as.the.regexp.modifier,."i".is.m |
2ec0 | 69 73 73 69 6e 67 2e 0a 20 20 20 20 20 2a 20 54 68 61 74 20 6d 65 61 6e 73 20 61 20 63 61 73 65 | issing.......*.That.means.a.case |
2ee0 | 20 73 65 6e 73 69 74 69 76 65 20 73 65 61 72 63 68 20 69 73 20 64 6f 6e 65 2e 0a 20 20 20 20 20 | .sensitive.search.is.done....... |
2f00 | 2a 20 40 76 61 72 20 20 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 | *.@var......string......*.@acces |
2f20 | 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 24 62 6c 6f | s...public......*.@see......$blo |
2f40 | 63 6b 6e 61 6d 65 52 65 67 45 78 70 2c 20 24 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c | cknameRegExp,.$openingDelimiter, |
2f60 | 20 24 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 | .$closingDelimiter......*/.....v |
2f80 | 61 72 20 24 76 61 72 69 61 62 6c 65 6e 61 6d 65 52 65 67 45 78 70 20 20 20 20 3d 20 22 5b 30 2d | ar.$variablenameRegExp....=."[0- |
2fa0 | 39 41 2d 5a 61 2d 7a 5f 2d 5d 2b 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 65 | 9A-Za-z_-]+";....../**......*.Re |
2fc0 | 67 45 78 70 20 75 73 65 64 20 74 6f 20 66 69 6e 64 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 | gExp.used.to.find.variable.place |
2fe0 | 68 6f 6c 64 65 72 2c 20 66 69 6c 6c 65 64 20 62 79 20 74 68 65 20 63 6f 6e 73 74 72 75 63 74 6f | holder,.filled.by.the.constructo |
3000 | 72 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 4c 6f | r.......*.@var......string....Lo |
3020 | 6f 6b 73 20 73 6f 6d 65 77 68 61 74 20 6c 69 6b 65 20 40 28 64 65 6c 69 6d 69 74 65 72 20 76 61 | oks.somewhat.like.@(delimiter.va |
3040 | 72 6e 61 6d 65 20 64 65 6c 69 6d 69 74 65 72 29 40 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 | rname.delimiter)@......*.@access |
3060 | 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 49 6e 74 65 67 | ...public......*.@see......Integ |
3080 | 72 61 74 65 64 54 65 6d 70 6c 61 74 65 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 | ratedTemplate()......*/.....var. |
30a0 | 24 76 61 72 69 61 62 6c 65 73 52 65 67 45 78 70 20 3d 20 22 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a | $variablesRegExp.=."";....../**. |
30c0 | 20 20 20 20 20 2a 20 52 65 67 45 78 70 20 75 73 65 64 20 74 6f 20 73 74 72 69 70 20 75 6e 75 73 | .....*.RegExp.used.to.strip.unus |
30e0 | 65 64 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 2e 0a 20 20 20 20 20 2a 20 | ed.variable.placeholder.......*. |
3100 | 40 62 72 6f 74 68 65 72 20 20 24 76 61 72 69 61 62 6c 65 73 52 65 67 45 78 70 0a 20 20 20 20 20 | @brother..$variablesRegExp...... |
3120 | 2a 2f 0a 20 20 20 20 76 61 72 20 24 72 65 6d 6f 76 65 56 61 72 69 61 62 6c 65 73 52 65 67 45 78 | */.....var.$removeVariablesRegEx |
3140 | 70 20 3d 20 22 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6f 6e 74 72 6f 6c 73 | p.=."";....../**......*.Controls |
3160 | 20 74 68 65 20 68 61 6e 64 6c 69 6e 67 20 6f 66 20 75 6e 6b 6e 6f 77 6e 20 76 61 72 69 61 62 6c | .the.handling.of.unknown.variabl |
3180 | 65 73 2c 20 64 65 66 61 75 6c 74 20 69 73 20 72 65 6d 6f 76 65 2e 0a 20 20 20 20 20 2a 20 40 76 | es,.default.is.remove.......*.@v |
31a0 | 61 72 20 20 20 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 | ar......boolean......*.@access.. |
31c0 | 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 72 65 6d 6f 76 65 55 | .public......*/.....var.$removeU |
31e0 | 6e 6b 6e 6f 77 6e 56 61 72 69 61 62 6c 65 73 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 2f 2a 2a | nknownVariables.=.true;....../** |
3200 | 0a 20 20 20 20 20 2a 20 43 6f 6e 74 72 6f 6c 73 20 74 68 65 20 68 61 6e 64 6c 69 6e 67 20 6f 66 | ......*.Controls.the.handling.of |
3220 | 20 65 6d 70 74 79 20 62 6c 6f 63 6b 73 2c 20 64 65 66 61 75 6c 74 20 69 73 20 72 65 6d 6f 76 65 | .empty.blocks,.default.is.remove |
3240 | 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 | .......*.@var......boolean...... |
3260 | 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 | *.@access...public......*/.....v |
3280 | 61 72 20 24 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 20 3d 20 74 72 75 65 3b 0a 0a 20 | ar.$removeEmptyBlocks.=.true;... |
32a0 | 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 65 67 45 78 70 20 75 73 65 64 20 74 6f 20 66 69 6e | .../**......*.RegExp.used.to.fin |
32c0 | 64 20 62 6c 6f 63 6b 73 20 61 6e 20 74 68 65 69 72 20 63 6f 6e 74 65 6e 74 2c 20 66 69 6c 6c 65 | d.blocks.an.their.content,.fille |
32e0 | 64 20 62 79 20 74 68 65 20 63 6f 6e 73 74 72 75 63 74 6f 72 2e 0a 20 20 20 20 20 2a 20 40 76 61 | d.by.the.constructor.......*.@va |
3300 | 72 20 20 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 49 | r......string......*.@see......I |
3320 | 6e 74 65 67 72 61 74 65 64 54 65 6d 70 6c 61 74 65 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 | ntegratedTemplate()......*/..... |
3340 | 76 61 72 20 24 62 6c 6f 63 6b 52 65 67 45 78 70 20 3d 20 22 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a | var.$blockRegExp.=."";....../**. |
3360 | 20 20 20 20 20 2a 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 62 6c 6f 63 6b | .....*.Name.of.the.current.block |
3380 | 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a | .......*.@var......string......* |
33a0 | 2f 0a 20 20 20 20 76 61 72 20 24 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 22 5f 5f 67 6c 6f | /.....var.$currentBlock.=."__glo |
33c0 | 62 61 6c 5f 5f 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6f 6e 74 65 6e 74 20 | bal__";....../**......*.Content. |
33e0 | 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 | of.the.template.......*.@var.... |
3400 | 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 74 65 6d 70 6c 61 | ..string......*/.....var.$templa |
3420 | 74 65 20 3d 20 22 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 41 72 72 61 79 20 6f | te.=."";....../**......*.Array.o |
3440 | 66 20 61 6c 6c 20 62 6c 6f 63 6b 73 20 61 6e 64 20 74 68 65 69 72 20 63 6f 6e 74 65 6e 74 2e 0a | f.all.blocks.and.their.content.. |
3460 | 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 61 72 72 61 79 0a 20 20 | .....*......*.@var......array... |
3480 | 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 66 69 6e 64 42 6c 6f 63 6b 73 28 29 0a 20 20 20 20 | ...*.@see......findBlocks()..... |
34a0 | 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 62 6c 6f 63 6b 6c 69 73 74 20 3d 20 61 72 72 61 79 28 29 | .*/.....var.$blocklist.=.array() |
34c0 | 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 41 72 72 61 79 20 77 69 74 68 20 74 68 65 | ;....../**......*.Array.with.the |
34e0 | 20 70 61 72 73 65 64 20 63 6f 6e 74 65 6e 74 20 6f 66 20 61 20 62 6c 6f 63 6b 2e 0a 20 20 20 20 | .parsed.content.of.a.block...... |
3500 | 20 2a 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 20 2a | .*......*.@var......array......* |
3520 | 2f 0a 20 20 20 20 76 61 72 20 24 62 6c 6f 63 6b 64 61 74 61 20 3d 20 61 72 72 61 79 28 29 3b 0a | /.....var.$blockdata.=.array();. |
3540 | 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 41 72 72 61 79 20 6f 66 20 76 61 72 69 61 62 6c | ...../**......*.Array.of.variabl |
3560 | 65 73 20 69 6e 20 61 20 62 6c 6f 63 6b 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 | es.in.a.block.......*.@var...... |
3580 | 61 72 72 61 79 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 62 6c 6f 63 6b 76 61 72 69 | array......*/.....var.$blockvari |
35a0 | 61 62 6c 65 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a | ables.=.array();....../**......* |
35c0 | 20 41 72 72 61 79 20 6f 66 20 69 6e 6e 65 72 20 62 6c 6f 63 6b 73 20 6f 66 20 61 20 62 6c 6f 63 | .Array.of.inner.blocks.of.a.bloc |
35e0 | 6b 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 20 2a | k.......*.@var......array......* |
3600 | 2f 0a 20 20 20 20 76 61 72 20 24 62 6c 6f 63 6b 69 6e 6e 65 72 20 20 20 20 20 20 20 20 20 3d 20 | /.....var.$blockinner.........=. |
3620 | 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 4c 69 73 74 20 6f 66 | array();....../**......*.List.of |
3640 | 20 62 6c 6f 63 6b 73 20 74 6f 20 70 72 65 76 65 72 73 65 20 65 76 65 6e 20 69 66 20 74 68 65 79 | .blocks.to.preverse.even.if.they |
3660 | 20 61 72 65 20 22 65 6d 70 74 79 22 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 54 68 69 73 | .are."empty".......*......*.This |
3680 | 20 69 73 20 73 6f 6d 65 74 68 69 6e 67 20 73 70 65 63 69 61 6c 2e 20 53 6f 6d 65 74 69 6d 65 73 | .is.something.special..Sometimes |
36a0 | 20 79 6f 75 20 68 61 76 65 20 62 6c 6f 63 6b 73 20 74 68 61 74 0a 20 20 20 20 20 2a 20 73 68 6f | .you.have.blocks.that......*.sho |
36c0 | 75 6c 64 20 62 65 20 70 72 65 73 65 72 76 65 64 20 61 6c 74 68 6f 75 67 68 20 74 68 65 79 20 61 | uld.be.preserved.although.they.a |
36e0 | 72 65 20 65 6d 70 74 79 20 28 6e 6f 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 72 65 70 6c 61 63 65 | re.empty.(no.placeholder.replace |
3700 | 64 29 2e 0a 20 20 20 20 20 2a 20 54 68 69 6e 6b 20 6f 66 20 61 20 73 68 6f 70 70 69 6e 67 20 62 | d).......*.Think.of.a.shopping.b |
3720 | 61 73 6b 65 74 2e 20 49 66 20 69 74 27 73 20 65 6d 70 74 79 20 79 6f 75 20 68 61 76 65 20 74 6f | asket..If.it's.empty.you.have.to |
3740 | 20 64 72 6f 70 20 61 20 6d 65 73 73 61 67 65 20 74 6f 0a 20 20 20 20 20 2a 20 74 68 65 20 75 73 | .drop.a.message.to......*.the.us |
3760 | 65 72 2e 20 49 66 20 69 74 27 73 20 66 69 6c 6c 65 64 20 79 6f 75 20 68 61 76 65 20 74 6f 20 73 | er..If.it's.filled.you.have.to.s |
3780 | 68 6f 77 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66 0a 20 20 20 20 20 2a 20 74 68 65 20 73 | how.the.contents.of......*.the.s |
37a0 | 68 6f 70 70 69 6e 67 20 62 61 73 65 6b 65 74 2e 20 4e 6f 77 20 77 68 65 72 65 20 64 6f 20 79 6f | hopping.baseket..Now.where.do.yo |
37c0 | 75 20 70 6c 61 63 65 20 74 68 65 20 6d 65 73 73 61 67 65 20 74 68 61 74 20 74 68 65 20 62 61 73 | u.place.the.message.that.the.bas |
37e0 | 6b 65 74 0a 20 20 20 20 20 2a 20 69 73 20 65 6d 70 74 79 3f 20 49 74 27 73 20 6e 6f 20 67 6f 6f | ket......*.is.empty?.It's.no.goo |
3800 | 64 20 69 64 65 61 20 74 6f 20 70 6c 61 63 65 20 69 74 20 69 6e 20 79 6f 75 20 61 70 70 6c 69 63 | d.idea.to.place.it.in.you.applic |
3820 | 61 74 69 6f 6e 73 20 61 73 20 63 75 73 74 6f 6d 65 72 73 0a 20 20 20 20 20 2a 20 74 65 6e 64 20 | ations.as.customers......*.tend. |
3840 | 74 6f 20 6c 69 6b 65 20 75 6e 65 63 65 73 73 61 72 79 20 6d 69 6e 6f 72 20 74 65 78 74 20 63 68 | to.like.unecessary.minor.text.ch |
3860 | 61 6e 67 65 73 2e 20 48 61 76 69 6e 67 20 61 6e 6f 74 68 65 72 20 74 65 6d 70 6c 61 74 65 20 66 | anges..Having.another.template.f |
3880 | 69 6c 65 0a 20 20 20 20 20 2a 20 66 6f 72 20 61 6e 20 65 6d 70 74 79 20 62 61 73 6b 65 74 20 6d | ile......*.for.an.empty.basket.m |
38a0 | 65 61 6e 73 20 74 68 61 74 20 69 74 27 73 20 76 65 72 79 20 6c 69 6b 65 6c 79 20 74 68 61 74 20 | eans.that.it's.very.likely.that. |
38c0 | 6f 6e 65 20 66 69 6e 65 20 64 61 79 0a 20 20 20 20 20 2a 20 74 68 65 20 66 69 6c 6c 65 64 20 61 | one.fine.day......*.the.filled.a |
38e0 | 6e 64 20 65 6d 70 74 79 20 62 61 73 6b 65 74 20 74 65 6d 70 6c 61 74 65 73 20 68 61 76 65 20 64 | nd.empty.basket.templates.have.d |
3900 | 69 66 66 65 72 65 6e 74 20 6c 61 79 6f 75 74 2e 20 49 20 64 65 63 69 64 65 64 0a 20 20 20 20 20 | ifferent.layout..I.decided...... |
3920 | 2a 20 74 6f 20 69 6e 74 72 6f 64 75 63 65 20 62 6c 6f 63 6b 73 20 74 68 61 74 20 74 6f 20 6e 6f | *.to.introduce.blocks.that.to.no |
3940 | 74 20 63 6f 6e 74 61 69 6e 20 61 6e 79 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 62 75 74 20 6f 6e | t.contain.any.placeholder.but.on |
3960 | 6c 79 0a 20 20 20 20 20 2a 20 74 65 78 74 20 73 75 63 68 20 61 73 20 74 68 65 20 6d 65 73 73 61 | ly......*.text.such.as.the.messa |
3980 | 67 65 20 22 59 6f 75 72 20 73 68 6f 70 70 69 6e 67 20 62 61 73 6b 65 64 20 69 73 20 65 6d 70 74 | ge."Your.shopping.basked.is.empt |
39a0 | 79 22 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 4e 6f 77 20 69 66 20 74 68 65 72 65 20 69 | y".......*......*.Now.if.there.i |
39c0 | 73 20 6e 6f 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 64 6f 6e 65 20 69 6e 20 73 75 63 68 20 61 20 | s.no.replacement.done.in.such.a. |
39e0 | 62 6c 6f 63 6b 20 74 68 65 20 62 6c 6f 63 6b 20 77 69 6c 6c 0a 20 20 20 20 20 2a 20 62 65 20 72 | block.the.block.will......*.be.r |
3a00 | 65 63 6f 67 6e 69 7a 65 64 20 61 73 20 22 65 6d 70 74 79 22 20 61 6e 64 20 62 79 20 64 65 66 61 | ecognized.as."empty".and.by.defa |
3a20 | 75 6c 74 20 28 24 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 20 3d 20 74 72 75 65 29 20 | ult.($removeEmptyBlocks.=.true). |
3a40 | 62 65 0a 20 20 20 20 20 2a 20 73 74 72 69 70 70 65 64 20 6f 66 66 2e 20 54 6f 20 61 76 6f 69 64 | be......*.stripped.off..To.avoid |
3a60 | 20 74 68 69 73 79 6f 75 20 63 61 6e 20 6e 6f 77 20 63 61 6c 6c 20 74 6f 75 63 68 42 6c 6f 63 6b | .thisyou.can.now.call.touchBlock |
3a80 | 28 29 20 74 6f 20 61 76 6f 69 64 20 74 68 69 73 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 | ().to.avoid.this.......*......*. |
3aa0 | 54 68 65 20 61 72 72 61 79 20 24 74 6f 75 63 68 65 64 42 6c 6f 63 6b 73 20 73 74 6f 72 65 73 20 | The.array.$touchedBlocks.stores. |
3ac0 | 61 20 6c 69 73 74 20 6f 66 20 74 6f 75 63 68 65 64 20 62 6c 6f 63 6b 20 77 68 69 63 68 20 6d 75 | a.list.of.touched.block.which.mu |
3ae0 | 73 74 20 6e 6f 74 0a 20 20 20 20 20 2a 20 62 65 20 72 65 6d 6f 76 65 64 20 65 76 65 6e 20 69 66 | st.not......*.be.removed.even.if |
3b00 | 20 74 68 65 79 20 61 72 65 20 65 6d 70 74 79 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 | .they.are.empty.......*......*.@ |
3b20 | 76 61 72 20 20 61 72 72 61 79 20 20 20 20 24 74 6f 75 63 68 65 64 42 6c 6f 63 6b 73 0a 20 20 20 | var..array....$touchedBlocks.... |
3b40 | 20 20 2a 20 40 73 65 65 20 20 74 6f 75 63 68 42 6c 6f 63 6b 28 29 2c 20 24 72 65 6d 6f 76 65 45 | ..*.@see..touchBlock(),.$removeE |
3b60 | 6d 70 74 79 42 6c 6f 63 6b 73 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 20 76 61 72 20 24 74 6f 75 | mptyBlocks......*/......var.$tou |
3b80 | 63 68 65 64 42 6c 6f 63 6b 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 | chedBlocks.=.array();....../**.. |
3ba0 | 20 20 20 20 2a 20 4c 69 73 74 20 6f 66 20 62 6c 6f 63 6b 73 20 77 68 69 63 68 20 73 68 6f 75 6c | ....*.List.of.blocks.which.shoul |
3bc0 | 64 20 6e 6f 74 20 62 65 20 73 68 6f 77 6e 20 65 76 65 6e 20 69 66 20 6e 6f 74 20 22 65 6d 70 74 | d.not.be.shown.even.if.not."empt |
3be0 | 79 22 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 61 72 72 61 79 20 20 20 20 24 5f 68 69 64 64 65 | y"......*.@var..array....$_hidde |
3c00 | 6e 42 6c 6f 63 6b 73 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 68 69 64 65 42 6c 6f 63 6b 28 29 | nBlocks......*.@see..hideBlock() |
3c20 | 2c 20 24 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 0a 20 20 20 20 20 2a 2f 0a 20 20 20 | ,.$removeEmptyBlocks......*/.... |
3c40 | 20 76 61 72 20 24 5f 68 69 64 64 65 6e 42 6c 6f 63 6b 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a | .var.$_hiddenBlocks.=.array();.. |
3c60 | 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 56 61 72 69 61 62 6c 65 20 63 61 63 68 65 2e 0a 20 | ..../**......*.Variable.cache... |
3c80 | 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 56 61 72 69 61 62 6c 65 73 20 67 65 74 20 63 61 63 68 65 | ....*......*.Variables.get.cache |
3ca0 | 64 20 62 65 66 6f 72 65 20 61 6e 79 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 69 73 20 64 6f 6e 65 | d.before.any.replacement.is.done |
3cc0 | 2e 0a 20 20 20 20 20 2a 20 41 64 76 61 6e 74 61 67 65 3a 20 65 6d 70 74 79 20 62 6c 6f 63 6b 73 | .......*.Advantage:.empty.blocks |
3ce0 | 20 63 61 6e 20 62 65 20 72 65 6d 6f 76 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 2e 0a 20 | .can.be.removed.automatically... |
3d00 | 20 20 20 20 2a 20 44 69 73 61 64 76 61 6e 74 61 67 65 3a 20 6d 69 67 68 74 20 74 61 6b 65 20 73 | ....*.Disadvantage:.might.take.s |
3d20 | 6f 6d 65 20 6d 6f 72 65 20 6d 65 6d 6f 72 79 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 76 | ome.more.memory......*......*.@v |
3d40 | 61 72 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 73 65 74 56 61 | ar....array......*.@see....setVa |
3d60 | 72 69 61 62 6c 65 28 29 2c 20 24 63 6c 65 61 72 43 61 63 68 65 4f 6e 50 61 72 73 65 0a 20 20 20 | riable(),.$clearCacheOnParse.... |
3d80 | 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 76 61 72 69 61 62 6c 65 43 61 63 68 65 20 3d 20 61 72 | ..*/.....var.$variableCache.=.ar |
3da0 | 72 61 79 28 29 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6c 65 61 72 20 74 68 65 | ray();....../**......*.Clear.the |
3dc0 | 20 76 61 72 69 61 62 6c 65 20 63 61 63 68 65 20 6f 6e 20 70 61 72 73 65 3f 0a 20 20 20 20 20 2a | .variable.cache.on.parse?......* |
3de0 | 0a 20 20 20 20 20 2a 20 49 66 20 79 6f 75 27 72 65 20 6e 6f 74 20 61 6e 20 65 78 70 65 72 74 20 | ......*.If.you're.not.an.expert. |
3e00 | 6a 75 73 74 20 6c 65 61 76 65 20 74 68 65 20 64 65 66 61 75 6c 74 20 66 61 6c 73 65 2e 0a 20 20 | just.leave.the.default.false.... |
3e20 | 20 20 20 2a 20 54 72 75 65 20 72 65 64 75 63 65 73 20 6d 65 6d 6f 72 79 20 63 6f 6e 73 75 6d 70 | ...*.True.reduces.memory.consump |
3e40 | 74 69 6f 6e 20 73 6f 6d 65 77 68 61 74 20 69 66 20 79 6f 75 20 74 65 6e 64 20 74 6f 0a 20 20 20 | tion.somewhat.if.you.tend.to.... |
3e60 | 20 20 2a 20 61 64 64 20 6c 6f 74 73 20 6f 66 20 76 61 6c 75 65 73 20 66 6f 72 20 75 6e 6b 6e 6f | ..*.add.lots.of.values.for.unkno |
3e80 | 77 6e 20 70 6c 61 63 65 68 6f 6c 64 65 72 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 76 | wn.placeholder.......*......*.@v |
3ea0 | 61 72 20 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 63 | ar....boolean......*/.....var.$c |
3ec0 | 6c 65 61 72 43 61 63 68 65 4f 6e 50 61 72 73 65 20 3d 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 2f | learCacheOnParse.=.false;....../ |
3ee0 | 2a 2a 0a 20 20 20 20 20 2a 20 52 6f 6f 74 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 61 6c 6c | **......*.Root.directory.for.all |
3f00 | 20 66 69 6c 65 20 6f 70 65 72 61 74 69 6f 6e 73 2e 0a 20 20 20 20 20 2a 20 54 68 65 20 73 74 72 | .file.operations.......*.The.str |
3f20 | 69 6e 67 20 67 65 74 73 20 70 72 65 66 69 78 65 64 20 74 6f 20 61 6c 6c 20 66 69 6c 65 6e 61 6d | ing.gets.prefixed.to.all.filenam |
3f40 | 65 73 20 67 69 76 65 6e 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 73 74 72 69 6e 67 0a | es.given.......*.@var....string. |
3f60 | 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 28 | .....*.@see....HTML_Template_IT( |
3f80 | 29 2c 20 73 65 74 52 6f 6f 74 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 66 69 | ),.setRoot()......*/.....var.$fi |
3fa0 | 6c 65 52 6f 6f 74 20 3d 20 22 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 49 6e 74 | leRoot.=."";....../**......*.Int |
3fc0 | 65 72 6e 61 6c 20 66 6c 61 67 20 69 6e 64 69 63 61 74 69 6e 67 20 74 68 61 74 20 61 20 62 6c 6f | ernal.flag.indicating.that.a.blo |
3fe0 | 63 6b 6e 61 6d 65 20 77 61 73 20 75 73 65 64 20 6d 75 6c 74 69 70 6c 65 20 74 69 6d 65 73 2e 0a | ckname.was.used.multiple.times.. |
4000 | 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 2a 2f 0a 20 | .....*.@var....boolean......*/.. |
4020 | 20 20 20 76 61 72 20 24 66 6c 61 67 42 6c 6f 63 6b 74 72 6f 75 62 6c 65 20 3d 20 66 61 6c 73 65 | ...var.$flagBlocktrouble.=.false |
4040 | 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 46 6c 61 67 20 69 6e 64 69 63 61 74 69 6e | ;....../**......*.Flag.indicatin |
4060 | 67 20 74 68 61 74 20 74 68 65 20 67 6c 6f 62 61 6c 20 62 6c 6f 63 6b 20 77 61 73 20 70 61 72 73 | g.that.the.global.block.was.pars |
4080 | 65 64 2e 0a 20 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 | ed.......*.@var....boolean...... |
40a0 | 2a 2f 0a 20 20 20 20 76 61 72 20 24 66 6c 61 67 47 6c 6f 62 61 6c 50 61 72 73 65 64 20 3d 20 66 | */.....var.$flagGlobalParsed.=.f |
40c0 | 61 6c 73 65 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 45 58 50 45 52 49 4d 45 4e 54 | alse;....../**......*.EXPERIMENT |
40e0 | 41 4c 21 20 46 49 58 4d 45 21 0a 20 20 20 20 20 2a 20 46 6c 61 67 20 69 6e 64 69 63 61 74 69 6f | AL!.FIXME!......*.Flag.indicatio |
4100 | 6e 20 74 68 61 74 20 61 20 74 65 6d 70 6c 61 74 65 20 67 65 74 73 20 63 61 63 68 65 64 2e 0a 20 | n.that.a.template.gets.cached... |
4120 | 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 43 6f 6d 70 6c 65 78 20 74 65 6d 70 6c 61 74 65 73 20 72 | ....*......*.Complex.templates.r |
4140 | 65 71 75 69 72 65 20 73 6f 6d 65 20 74 69 6d 65 73 20 74 6f 20 62 65 20 70 72 65 70 61 72 73 65 | equire.some.times.to.be.preparse |
4160 | 64 0a 20 20 20 20 20 2a 20 62 65 66 6f 72 65 20 74 68 65 20 72 65 70 6c 61 63 65 6d 65 6e 74 20 | d......*.before.the.replacement. |
4180 | 63 61 6e 20 74 61 6b 65 20 70 6c 61 63 65 2e 20 4f 66 74 65 6e 20 49 20 75 73 65 0a 20 20 20 20 | can.take.place..Often.I.use..... |
41a0 | 20 2a 20 6f 6e 65 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 20 6f 76 65 72 20 61 6e 64 20 6f 76 | .*.one.template.file.over.and.ov |
41c0 | 65 72 20 61 67 61 69 6e 20 62 75 74 20 49 20 64 6f 6e 27 74 20 6b 6e 6f 77 0a 20 20 20 20 20 2a | er.again.but.I.don't.know......* |
41e0 | 20 62 65 66 6f 72 65 20 74 68 61 74 20 49 20 77 69 6c 6c 20 75 73 65 20 74 68 65 20 73 61 6d 65 | .before.that.I.will.use.the.same |
4200 | 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 20 61 67 61 69 6e 2e 0a 20 20 20 20 20 2a 20 4e 6f 77 | .template.file.again.......*.Now |
4220 | 20 49 54 20 63 6f 75 6c 64 20 6e 6f 74 69 63 65 20 74 68 69 73 20 61 6e 64 20 73 6b 69 70 20 74 | .IT.could.notice.this.and.skip.t |
4240 | 68 65 20 70 72 65 70 61 72 73 65 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 76 61 72 20 | he.preparse.......*......*.@var. |
4260 | 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 66 6c 61 67 | ...boolean......*/.....var.$flag |
4280 | 43 61 63 68 65 54 65 6d 70 6c 61 74 65 66 69 6c 65 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 2f | CacheTemplatefile.=.true;....../ |
42a0 | 2a 2a 0a 20 20 20 20 20 2a 20 45 58 50 45 52 49 4d 45 4e 54 41 4c 21 20 46 49 58 4d 45 21 0a 20 | **......*.EXPERIMENTAL!.FIXME!.. |
42c0 | 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 6c 61 73 74 54 65 6d 70 6c 61 74 65 66 69 6c 65 | ....*/.....var.$lastTemplatefile |
42e0 | 20 3d 20 22 22 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 24 5f 6f 70 74 69 6f 6e 73 | .=."";....../**......*.$_options |
4300 | 5b 27 70 72 65 73 65 72 76 65 5f 64 61 74 61 27 5d 20 57 68 65 74 68 65 72 20 74 6f 20 73 75 62 | ['preserve_data'].Whether.to.sub |
4320 | 73 74 69 74 75 74 65 20 76 61 72 69 61 62 6c 65 73 20 61 6e 64 20 72 65 6d 6f 76 65 0a 20 20 20 | stitute.variables.and.remove.... |
4340 | 20 20 2a 20 65 6d 70 74 79 20 70 6c 61 63 65 68 6f 6c 64 65 72 73 20 69 6e 20 64 61 74 61 20 70 | ..*.empty.placeholders.in.data.p |
4360 | 61 73 73 65 64 20 74 68 72 6f 75 67 68 20 73 65 74 56 61 72 69 61 62 6c 65 0a 20 20 20 20 20 2a | assed.through.setVariable......* |
4380 | 20 28 73 65 65 20 61 6c 73 6f 20 62 75 67 73 20 23 32 30 31 39 39 2c 20 23 32 31 39 35 31 29 2e | .(see.also.bugs.#20199,.#21951). |
43a0 | 0a 20 20 20 20 20 2a 20 24 5f 6f 70 74 69 6f 6e 73 5b 27 75 73 65 5f 70 72 65 67 27 5d 20 57 68 | ......*.$_options['use_preg'].Wh |
43c0 | 65 74 68 65 72 20 74 6f 20 75 73 65 20 70 72 65 67 5f 72 65 70 6c 61 63 65 20 69 6e 73 74 65 61 | ether.to.use.preg_replace.instea |
43e0 | 64 20 6f 66 0a 20 20 20 20 20 2a 20 73 74 72 5f 72 65 70 6c 61 63 65 20 69 6e 20 70 61 72 73 65 | d.of......*.str_replace.in.parse |
4400 | 28 29 0a 20 20 20 20 20 2a 20 28 74 68 69 73 20 69 73 20 61 20 62 61 63 6b 77 61 72 64 73 20 63 | ()......*.(this.is.a.backwards.c |
4420 | 6f 6d 70 61 74 69 62 69 6c 69 74 79 20 66 65 61 74 75 72 65 2c 20 73 65 65 20 61 6c 73 6f 20 62 | ompatibility.feature,.see.also.b |
4440 | 75 67 73 20 23 32 31 39 35 31 2c 20 23 32 30 33 39 32 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 | ugs.#21951,.#20392)......*/..... |
4460 | 76 61 72 20 24 5f 6f 70 74 69 6f 6e 73 20 3d 20 61 72 72 61 79 28 0a 20 20 20 20 20 20 20 20 27 | var.$_options.=.array(.........' |
4480 | 70 72 65 73 65 72 76 65 5f 64 61 74 61 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 20 20 20 20 20 20 20 | preserve_data'.=>.false,........ |
44a0 | 20 27 75 73 65 5f 70 72 65 67 27 20 20 20 20 20 20 3d 3e 20 74 72 75 65 0a 20 20 20 20 29 3b 0a | .'use_preg'......=>.true.....);. |
44c0 | 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 42 75 69 6c 64 73 20 73 6f 6d 65 20 63 6f 6d | ....../**......*.Builds.some.com |
44e0 | 70 6c 65 78 20 72 65 67 75 6c 61 72 20 65 78 70 72 65 73 73 69 6f 6e 73 20 61 6e 64 20 6f 70 74 | plex.regular.expressions.and.opt |
4500 | 69 6e 61 6c 6c 79 20 73 65 74 73 20 74 68 65 0a 20 20 20 20 20 2a 20 66 69 6c 65 20 72 6f 6f 74 | inally.sets.the......*.file.root |
4520 | 20 64 69 72 65 63 74 6f 72 79 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 4d 61 6b 65 20 73 | .directory.......*......*.Make.s |
4540 | 75 72 65 20 74 68 61 74 20 79 6f 75 20 63 61 6c 6c 20 74 68 69 73 20 63 6f 6e 73 74 72 75 63 74 | ure.that.you.call.this.construct |
4560 | 6f 72 20 69 66 20 79 6f 75 20 64 65 72 69 76 65 20 79 6f 75 72 20 74 65 6d 70 6c 61 74 65 0a 20 | or.if.you.derive.your.template.. |
4580 | 20 20 20 20 2a 20 63 6c 61 73 73 20 66 72 6f 6d 20 74 68 69 73 20 6f 6e 65 2e 0a 20 20 20 20 20 | ....*.class.from.this.one....... |
45a0 | 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 46 69 6c | *......*.@param....string....Fil |
45c0 | 65 20 72 6f 6f 74 20 64 69 72 65 63 74 6f 72 79 2c 20 70 72 65 66 69 78 20 66 6f 72 20 61 6c 6c | e.root.directory,.prefix.for.all |
45e0 | 20 66 69 6c 65 6e 61 6d 65 73 0a 20 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .filenames......*............... |
4600 | 20 20 20 20 20 20 67 69 76 65 6e 20 74 6f 20 74 68 65 20 6f 62 6a 65 63 74 2e 0a 20 20 20 20 20 | ......given.to.the.object....... |
4620 | 2a 20 40 73 65 65 20 20 20 20 20 20 73 65 74 52 6f 6f 74 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 | *.@see......setRoot()......*/... |
4640 | 20 20 66 75 6e 63 74 69 6f 6e 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 28 24 72 6f 6f | ..function.HTML_Template_IT($roo |
4660 | 74 20 3d 20 22 22 2c 20 24 6f 70 74 69 6f 6e 73 3d 6e 75 6c 6c 29 20 7b 0a 20 20 20 20 20 20 20 | t.=."",.$options=null).{........ |
4680 | 20 69 66 28 21 69 73 5f 6e 75 6c 6c 28 24 6f 70 74 69 6f 6e 73 29 29 7b 0a 20 20 20 20 20 20 20 | .if(!is_null($options)){........ |
46a0 | 20 20 20 20 20 24 74 68 69 73 2d 3e 73 65 74 4f 70 74 69 6f 6e 73 28 24 6f 70 74 69 6f 6e 73 29 | .....$this->setOptions($options) |
46c0 | 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 | ;.........}.........$this->varia |
46e0 | 62 6c 65 73 52 65 67 45 78 70 20 3d 20 22 40 22 20 2e 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e | blesRegExp.=."@"...$this->openin |
4700 | 67 44 65 6c 69 6d 69 74 65 72 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | gDelimiter...................... |
4720 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 28 22 20 2e 20 24 74 68 69 73 2d 3e 76 61 72 69 61 | .............."("...$this->varia |
4740 | 62 6c 65 6e 61 6d 65 52 65 67 45 78 70 20 2e 20 22 29 22 20 2e 0a 20 20 20 20 20 20 20 20 20 20 | blenameRegExp...")"............. |
4760 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 6c | .......................$this->cl |
4780 | 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 20 22 40 73 6d 22 3b 0a 20 20 20 20 20 20 20 20 | osingDelimiter..."@sm";......... |
47a0 | 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 56 61 72 69 61 62 6c 65 73 52 65 67 45 78 70 20 3d 20 22 | $this->removeVariablesRegExp.=." |
47c0 | 40 22 20 2e 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 0a 20 | @"...$this->openingDelimiter.... |
47e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4800 | 20 20 20 20 20 20 22 5c 73 2a 28 22 20 2e 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 6e 61 | ......"\s*("...$this->variablena |
4820 | 6d 65 52 65 67 45 78 70 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | meRegExp........................ |
4840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 29 5c 73 2a 22 20 2e 20 24 74 68 69 73 | ..................")\s*"...$this |
4860 | 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 22 40 73 6d 22 3b 0a 0a 20 20 20 20 | ->closingDelimiter.."@sm";...... |
4880 | 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 52 65 67 45 78 70 20 3d 20 27 40 3c 21 2d 2d 5c | ....$this->blockRegExp.=.'@<!--\ |
48a0 | 73 2b 42 45 47 49 4e 5c 73 2b 28 27 20 2e 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6e 61 6d 65 52 | s+BEGIN\s+('...$this->blocknameR |
48c0 | 65 67 45 78 70 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | egExp........................... |
48e0 | 20 20 20 20 20 27 29 5c 73 2b 2d 2d 3e 28 2e 2a 29 3c 21 2d 2d 5c 73 2b 45 4e 44 5c 73 2b 5c 31 | .....')\s+-->(.*)<!--\s+END\s+\1 |
4900 | 5c 73 2b 2d 2d 3e 40 73 6d 27 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 73 65 74 52 | \s+-->@sm';..........$this->setR |
4920 | 6f 6f 74 28 24 72 6f 6f 74 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 63 6f 6e 73 74 72 75 | oot($root);.....}.//.end.constru |
4940 | 63 74 6f 72 0a 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 53 65 74 73 20 74 68 65 20 6f | ctor......./**......*.Sets.the.o |
4960 | 70 74 69 6f 6e 20 66 6f 72 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 73 73 0a 20 20 20 | ption.for.the.template.class.... |
4980 | 20 20 2a 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a | ..*......*.@access.public......* |
49a0 | 20 40 70 61 72 61 6d 20 20 73 74 72 69 6e 67 20 20 6f 70 74 69 6f 6e 20 6e 61 6d 65 0a 20 20 20 | .@param..string..option.name.... |
49c0 | 20 20 2a 20 40 70 61 72 61 6d 20 20 6d 69 78 65 64 20 20 20 6f 70 74 69 6f 6e 20 76 61 6c 75 65 | ..*.@param..mixed...option.value |
49e0 | 0a 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 6d 69 78 65 64 20 20 20 49 54 5f 4f 4b 20 6f 6e | ......*.@return.mixed...IT_OK.on |
4a00 | 20 73 75 63 63 65 73 73 2c 20 65 72 72 6f 72 20 6f 62 6a 65 63 74 20 6f 6e 20 66 61 69 6c 75 72 | .success,.error.object.on.failur |
4a20 | 65 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4f 70 74 69 6f 6e | e......*/.....function.setOption |
4a40 | 28 24 6f 70 74 69 6f 6e 2c 20 24 76 61 6c 75 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 | ($option,.$value).....{......... |
4a60 | 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 5f 6f 70 74 69 6f 6e 73 5b 24 6f 70 74 69 6f | if.(isset($this->_options[$optio |
4a80 | 6e 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 5f 6f 70 74 69 6f | n])).{.............$this->_optio |
4aa0 | 6e 73 5b 24 6f 70 74 69 6f 6e 5d 20 3d 20 24 76 61 6c 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 | ns[$option].=.$value;........... |
4ac0 | 20 20 72 65 74 75 72 6e 20 49 54 5f 4f 4b 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 | ..return.IT_OK;.........}....... |
4ae0 | 20 20 72 65 74 75 72 6e 20 50 45 41 52 3a 3a 72 61 69 73 65 45 72 72 6f 72 28 0a 20 20 20 20 20 | ..return.PEAR::raiseError(...... |
4b00 | 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 65 72 72 6f 72 4d 65 73 73 61 67 65 28 49 | ...........$this->errorMessage(I |
4b20 | 54 5f 55 4e 4b 4e 4f 57 4e 5f 4f 50 54 49 4f 4e 29 20 2e 20 22 3a 20 27 7b 24 6f 70 74 69 6f 6e | T_UNKNOWN_OPTION)...":.'{$option |
4b40 | 7d 27 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 55 4e 4b 4e 4f 57 4e 5f | }'",.................IT_UNKNOWN_ |
4b60 | 4f 50 54 49 4f 4e 0a 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 | OPTION.............);.....}..... |
4b80 | 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 53 65 74 73 20 74 68 65 20 6f 70 74 69 6f 6e 73 20 66 6f 72 | ./**......*.Sets.the.options.for |
4ba0 | 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 73 73 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 | .the.template.class......*...... |
4bc0 | 2a 20 40 61 63 63 65 73 73 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 | *.@access.public......*.@param.. |
4be0 | 73 74 72 69 6e 67 20 20 6f 70 74 69 6f 6e 73 20 61 72 72 61 79 20 6f 66 20 6f 70 74 69 6f 6e 73 | string..options.array.of.options |
4c00 | 0a 20 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 66 61 75 6c 74 20 | ......*.................default. |
4c20 | 76 61 6c 75 65 3a 0a 20 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | value:......*................... |
4c40 | 27 70 72 65 73 65 72 76 65 5f 64 61 74 61 27 20 3d 3e 20 66 61 6c 73 65 2c 0a 20 20 20 20 20 2a | 'preserve_data'.=>.false,......* |
4c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 75 73 65 5f 70 72 65 67 27 20 20 20 | ...................'use_preg'... |
4c80 | 20 20 20 3d 3e 20 74 72 75 65 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 6d 69 78 65 64 20 | ...=>.true......*.@param..mixed. |
4ca0 | 20 20 6f 70 74 69 6f 6e 20 76 61 6c 75 65 0a 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 6d 69 | ..option.value......*.@return.mi |
4cc0 | 78 65 64 20 20 20 49 54 5f 4f 4b 20 6f 6e 20 73 75 63 63 65 73 73 2c 20 65 72 72 6f 72 20 6f 62 | xed...IT_OK.on.success,.error.ob |
4ce0 | 6a 65 63 74 20 6f 6e 20 66 61 69 6c 75 72 65 0a 20 20 20 20 20 2a 20 40 73 65 65 20 24 6f 70 74 | ject.on.failure......*.@see.$opt |
4d00 | 69 6f 6e 73 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 4f 70 74 | ions......*/.....function.setOpt |
4d20 | 69 6f 6e 73 28 24 6f 70 74 69 6f 6e 73 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 66 6f 72 | ions($options).....{.........for |
4d40 | 65 61 63 68 28 24 6f 70 74 69 6f 6e 73 20 61 73 20 24 6f 70 74 69 6f 6e 3d 3e 24 76 61 6c 75 65 | each($options.as.$option=>$value |
4d60 | 29 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 28 20 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 | ){.............if(.PEAR::isError |
4d80 | 28 24 65 72 72 6f 72 3d 24 74 68 69 73 2d 3e 73 65 74 4f 70 74 69 6f 6e 28 24 6f 70 74 69 6f 6e | ($error=$this->setOption($option |
4da0 | 2c 20 24 76 61 6c 75 65 29 29 20 29 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | ,.$value)).){.................re |
4dc0 | 74 75 72 6e 20 24 65 72 72 6f 72 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 | turn.$error;.............}...... |
4de0 | 20 20 20 7d 0a 20 20 20 20 7d 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 50 72 69 6e 74 | ...}.....}....../**......*.Print |
4e00 | 20 61 20 63 65 72 74 61 69 6e 20 62 6c 6f 63 6b 20 77 69 74 68 20 61 6c 6c 20 72 65 70 6c 61 63 | .a.certain.block.with.all.replac |
4e20 | 65 6d 65 6e 74 73 20 64 6f 6e 65 2e 0a 20 20 20 20 20 2a 20 40 62 72 6f 74 68 65 72 20 67 65 74 | ements.done.......*.@brother.get |
4e40 | 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 68 6f 77 28 24 62 6c | ()......*/.....function.show($bl |
4e60 | 6f 63 6b 20 3d 20 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 29 20 7b 0a 20 20 20 20 20 20 20 20 70 72 | ock.=."__global__").{.........pr |
4e80 | 69 6e 74 20 24 74 68 69 73 2d 3e 67 65 74 28 24 62 6c 6f 63 6b 29 3b 0a 20 20 20 20 7d 20 2f 2f | int.$this->get($block);.....}.// |
4ea0 | 20 65 6e 64 20 66 75 6e 63 20 73 68 6f 77 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 | .end.func.show....../**......*.R |
4ec0 | 65 74 75 72 6e 73 20 61 20 62 6c 6f 63 6b 20 77 69 74 68 20 61 6c 6c 20 72 65 70 6c 61 63 65 6d | eturns.a.block.with.all.replacem |
4ee0 | 65 6e 74 73 20 64 6f 6e 65 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 | ents.done.......*......*.@param. |
4f00 | 20 20 20 73 74 72 69 6e 67 20 20 20 20 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 0a | ...string.....name.of.the.block. |
4f20 | 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 20 40 | .....*.@return...string......*.@ |
4f40 | 74 68 72 6f 77 73 20 20 20 50 45 41 52 5f 45 72 72 6f 72 0a 20 20 20 20 20 2a 20 40 61 63 63 65 | throws...PEAR_Error......*.@acce |
4f60 | 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 73 68 6f | ss...public......*.@see......sho |
4f80 | 77 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 28 24 62 6c | w()......*/.....function.get($bl |
4fa0 | 6f 63 6b 20 3d 20 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 69 | ock.=."__global__").{..........i |
4fc0 | 66 20 28 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 20 3d 3d 20 24 62 6c 6f 63 6b 20 26 26 20 21 24 74 | f.("__global__".==.$block.&&.!$t |
4fe0 | 68 69 73 2d 3e 66 6c 61 67 47 6c 6f 62 61 6c 50 61 72 73 65 64 29 0a 20 20 20 20 20 20 20 20 20 | his->flagGlobalParsed).......... |
5000 | 20 20 20 24 74 68 69 73 2d 3e 70 61 72 73 65 28 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 29 3b 0a 0a | ...$this->parse("__global__");.. |
5020 | 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c | ........if.(!isset($this->blockl |
5040 | 69 73 74 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 | ist[$block])).{.............$thi |
5060 | 73 2d 3e 65 72 72 5b 5d 20 3d 20 50 45 41 52 3a 3a 72 61 69 73 65 45 72 72 6f 72 28 0a 20 20 20 | s->err[].=.PEAR::raiseError(.... |
5080 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | .........................$this-> |
50a0 | 65 72 72 6f 72 4d 65 73 73 61 67 65 28 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e 44 | errorMessage(.IT_BLOCK_NOT_FOUND |
50c0 | 20 29 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .).............................. |
50e0 | 20 27 22 27 20 2e 20 24 62 6c 6f 63 6b 20 2e 20 22 27 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | .'"'...$block..."'",............ |
5100 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f | .................IT_BLOCK_NOT_FO |
5120 | 55 4e 44 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 | UND.........................);.. |
5140 | 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 22 22 3b 0a 20 20 20 20 20 20 20 20 7d 0a | ...........return."";.........}. |
5160 | 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b | .........if.(!isset($this->block |
5180 | 64 61 74 61 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | data[$block])).{.............ret |
51a0 | 75 72 6e 20 27 27 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 | urn.'';..........}.else.{....... |
51c0 | 20 20 20 20 20 20 24 72 65 74 20 3d 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 62 | ......$ret.=.$this->blockdata[$b |
51e0 | 6c 6f 63 6b 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 63 6c | lock];.............if.($this->cl |
5200 | 65 61 72 43 61 63 68 65 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 73 65 | earCache).{.................unse |
5220 | 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 62 6c 6f 63 6b 5d 29 3b 0a 20 20 20 | t($this->blockdata[$block]);.... |
5240 | 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 | .........}.............if.($this |
5260 | 2d 3e 5f 6f 70 74 69 6f 6e 73 5b 27 70 72 65 73 65 72 76 65 5f 64 61 74 61 27 5d 29 20 7b 0a 20 | ->_options['preserve_data']).{.. |
5280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 74 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 | ...............$ret.=.str_replac |
52a0 | 65 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 | e(.........................$this |
52c0 | 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 | ->openingDelimiter.............. |
52e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 27 25 70 72 65 73 65 72 76 65 64 25 27 20 2e 20 24 74 68 | .............'%preserved%'...$th |
5300 | 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 0a 20 20 20 20 20 20 20 20 20 20 | is->closingDelimiter,........... |
5320 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 | ..............$this->openingDeli |
5340 | 6d 69 74 65 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 | miter,.........................$ |
5360 | 72 65 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 | ret.....................);...... |
5380 | 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 72 65 74 | .......}.............return.$ret |
53a0 | 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 67 65 | ;.........}.....}.//.end.func.ge |
53c0 | 74 28 29 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 50 61 72 73 65 73 20 74 68 65 20 67 | t()....../**......*.Parses.the.g |
53e0 | 69 76 65 6e 20 62 6c 6f 63 6b 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d | iven.block.......*......*.@param |
5400 | 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 20 | ....string....name.of.the.block. |
5420 | 74 6f 20 62 65 20 70 61 72 73 65 64 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 | to.be.parsed......*.@access...pu |
5440 | 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 70 61 72 73 65 43 75 72 72 65 | blic......*.@see......parseCurre |
5460 | 6e 74 42 6c 6f 63 6b 28 29 0a 20 20 20 20 20 2a 20 40 74 68 72 6f 77 73 20 20 20 50 45 41 52 5f | ntBlock()......*.@throws...PEAR_ |
5480 | 45 72 72 6f 72 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 70 61 72 73 65 | Error......*/.....function.parse |
54a0 | 28 24 62 6c 6f 63 6b 20 3d 20 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 2c 20 24 66 6c 61 67 5f 72 65 | ($block.=."__global__",.$flag_re |
54c0 | 63 75 72 73 69 6f 6e 20 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 73 | cursion.=.false).....{.........s |
54e0 | 74 61 74 69 63 20 24 72 65 67 73 2c 20 24 76 61 6c 75 65 73 3b 0a 0a 20 20 20 20 20 20 20 20 69 | tatic.$regs,.$values;..........i |
5500 | 66 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 | f.(!isset($this->blocklist[$bloc |
5520 | 6b 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 50 45 41 52 3a 3a | k])).{.............return.PEAR:: |
5540 | 72 61 69 73 65 45 72 72 6f 72 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 | raiseError(.................$thi |
5560 | 73 2d 3e 65 72 72 6f 72 4d 65 73 73 61 67 65 28 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f | s->errorMessage(.IT_BLOCK_NOT_FO |
5580 | 55 4e 44 20 29 20 2e 20 27 22 27 20 2e 20 24 62 6c 6f 63 6b 20 2e 20 22 27 22 2c 0a 20 20 20 20 | UND.)...'"'...$block..."'",..... |
55a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 | ....................IT_BLOCK_NOT |
55c0 | 5f 46 4f 55 4e 44 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 | _FOUND.................);....... |
55e0 | 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 20 3d 3d | ..}..........if.("__global__".== |
5600 | 20 24 62 6c 6f 63 6b 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 6c | .$block).{.............$this->fl |
5620 | 61 67 47 6c 6f 62 61 6c 50 61 72 73 65 64 20 3d 20 74 72 75 65 3b 0a 20 20 20 20 20 20 20 20 7d | agGlobalParsed.=.true;.........} |
5640 | 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 24 66 6c 61 67 5f 72 65 63 75 72 73 69 6f 6e 29 20 | ..........if.(!$flag_recursion). |
5660 | 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 67 73 20 20 20 3d 20 61 72 72 61 79 28 29 3b | {.............$regs...=.array(); |
5680 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 76 61 6c 75 65 73 20 3d 20 61 72 72 61 79 28 29 3b 0a | .............$values.=.array();. |
56a0 | 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 6f 75 74 65 72 20 3d 20 24 74 68 69 73 | ........}.........$outer.=.$this |
56c0 | 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d 3b 0a 20 20 20 20 20 20 20 20 24 65 6d | ->blocklist[$block];.........$em |
56e0 | 70 74 79 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e | pty.=.true;..........if.($this-> |
5700 | 63 6c 65 61 72 43 61 63 68 65 4f 6e 50 61 72 73 65 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 | clearCacheOnParse).{............ |
5720 | 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 20 | ..foreach.($this->variableCache. |
5740 | 61 73 20 24 6e 61 6d 65 20 3d 3e 20 24 76 61 6c 75 65 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | as.$name.=>.$value).{........... |
5760 | 20 20 20 20 20 20 24 72 65 67 73 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 | ......$regs[].=.$this->openingDe |
5780 | 6c 69 6d 69 74 65 72 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | limiter......................... |
57a0 | 20 20 20 20 24 6e 61 6d 65 20 2e 20 24 74 68 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 | ....$name...$this->closingDelimi |
57c0 | 74 65 72 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 76 61 6c 75 65 73 5b 5d 20 3d | ter;.................$values[].= |
57e0 | 20 24 76 61 6c 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 65 6d 70 74 79 20 | .$value;.................$empty. |
5800 | 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 | =.false;.............}.......... |
5820 | 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 20 3d 20 61 72 72 61 79 28 | ...$this->variableCache.=.array( |
5840 | 29 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 | );..........}.else.{............ |
5860 | 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 | ..foreach.($this->blockvariables |
5880 | 5b 24 62 6c 6f 63 6b 5d 20 61 73 20 24 61 6c 6c 6f 77 65 64 76 61 72 20 3d 3e 20 24 76 29 20 7b | [$block].as.$allowedvar.=>.$v).{ |
58a0 | 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 73 65 74 28 24 74 68 69 | ..................if.(isset($thi |
58c0 | 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b 24 61 6c 6c 6f 77 65 64 76 61 72 5d 29 29 20 | s->variableCache[$allowedvar])). |
58e0 | 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 67 73 5b 5d 20 20 20 3d | {....................$regs[]...= |
5900 | 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 0a 20 20 20 20 20 | .$this->openingDelimiter........ |
5920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 61 6c 6c 6f 77 | ..........................$allow |
5940 | 65 64 76 61 72 20 2e 20 24 74 68 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 3b | edvar...$this->closingDelimiter; |
5960 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 76 61 6c 75 65 73 5b 5d 20 3d 20 | ....................$values[].=. |
5980 | 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b 24 61 6c 6c 6f 77 65 64 76 61 72 | $this->variableCache[$allowedvar |
59a0 | 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 24 74 68 69 | ];....................unset($thi |
59c0 | 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b 24 61 6c 6c 6f 77 65 64 76 61 72 5d 29 3b 0a | s->variableCache[$allowedvar]);. |
59e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 65 6d 70 74 79 20 3d 20 66 61 6c 73 | ...................$empty.=.fals |
5a00 | 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 | e;.................}............ |
5a20 | 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 73 73 65 | ..}..........}..........if.(isse |
5a40 | 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a | t($this->blockinner[$block])).{. |
5a60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f | .............foreach.($this->blo |
5a80 | 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 5d 20 61 73 20 24 6b 20 3d 3e 20 24 69 6e 6e 65 72 62 | ckinner[$block].as.$k.=>.$innerb |
5aa0 | 6c 6f 63 6b 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | lock).{..................$this-> |
5ac0 | 70 61 72 73 65 28 24 69 6e 6e 65 72 62 6c 6f 63 6b 2c 20 74 72 75 65 29 3b 0a 20 20 20 20 20 20 | parse($innerblock,.true);....... |
5ae0 | 20 20 20 20 20 20 20 20 20 20 69 66 20 28 22 22 20 21 3d 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b | ..........if.("".!=.$this->block |
5b00 | 64 61 74 61 5b 24 69 6e 6e 65 72 62 6c 6f 63 6b 5d 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | data[$innerblock]).{............ |
5b20 | 20 20 20 20 20 20 20 20 20 24 65 6d 70 74 79 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 | .........$empty.=.false;........ |
5b40 | 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 70 6c 61 | .........}..................$pla |
5b60 | 63 65 68 6f 6c 64 65 72 20 3d 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 | ceholder.=.$this->openingDelimit |
5b80 | 65 72 20 2e 20 22 5f 5f 22 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | er..."__"....................... |
5ba0 | 20 20 20 20 20 20 20 20 20 20 20 20 24 69 6e 6e 65 72 62 6c 6f 63 6b 20 2e 20 22 5f 5f 22 20 2e | ............$innerblock..."__".. |
5bc0 | 20 24 74 68 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 3b 0a 20 20 20 20 20 20 | .$this->closingDelimiter;....... |
5be0 | 20 20 20 20 20 20 20 20 20 20 24 6f 75 74 65 72 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 0a | ..........$outer.=.str_replace(. |
5c00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
5c20 | 20 20 20 20 24 70 6c 61 63 65 68 6f 6c 64 65 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ....$placeholder,............... |
5c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f | ......................$this->blo |
5c60 | 63 6b 64 61 74 61 5b 24 69 6e 6e 65 72 62 6c 6f 63 6b 5d 2c 20 24 6f 75 74 65 72 0a 20 20 20 20 | ckdata[$innerblock],.$outer..... |
5c80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 | ....................);.......... |
5ca0 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 69 6e 6e 65 72 62 6c | .......$this->blockdata[$innerbl |
5cc0 | 6f 63 6b 5d 20 3d 20 22 22 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 | ock].=."";.............}........ |
5ce0 | 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 24 66 6c 61 67 5f 72 65 63 75 72 73 69 6f | ..}..........if.(!$flag_recursio |
5d00 | 6e 20 26 26 20 30 20 21 3d 20 63 6f 75 6e 74 28 24 76 61 6c 75 65 73 29 29 20 7b 0a 20 20 20 20 | n.&&.0.!=.count($values)).{..... |
5d20 | 20 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 5f 6f 70 74 69 6f 6e 73 5b 27 75 73 65 | ........if.($this->_options['use |
5d40 | 5f 70 72 65 67 27 5d 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 67 73 | _preg']).{.................$regs |
5d60 | 20 20 20 20 20 20 20 20 3d 20 61 72 72 61 79 5f 6d 61 70 28 61 72 72 61 79 28 0a 20 20 20 20 20 | ........=.array_map(array(...... |
5d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 26 | ...............................& |
5da0 | 24 74 68 69 73 2c 20 27 5f 61 64 64 50 72 65 67 44 65 6c 69 6d 69 74 65 72 73 27 29 2c 0a 20 20 | $this,.'_addPregDelimiters'),... |
5dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
5de0 | 20 20 24 72 65 67 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..$regs......................... |
5e00 | 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 66 75 6e 63 | ........);.................$func |
5e20 | 52 65 70 6c 61 63 65 20 3d 20 27 70 72 65 67 5f 72 65 70 6c 61 63 65 27 3b 0a 20 20 20 20 20 20 | Replace.=.'preg_replace';....... |
5e40 | 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 | ......}.else.{.................$ |
5e60 | 66 75 6e 63 52 65 70 6c 61 63 65 20 3d 20 27 73 74 72 5f 72 65 70 6c 61 63 65 27 3b 0a 20 20 20 | funcReplace.=.'str_replace';.... |
5e80 | 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 | .........}.............if.($this |
5ea0 | 2d 3e 5f 6f 70 74 69 6f 6e 73 5b 27 70 72 65 73 65 72 76 65 5f 64 61 74 61 27 5d 29 20 7b 0a 20 | ->_options['preserve_data']).{.. |
5ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 76 61 6c 75 65 73 20 3d 20 61 72 72 61 79 5f 6d | ...............$values.=.array_m |
5ee0 | 61 70 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ap(............................. |
5f00 | 61 72 72 61 79 28 26 24 74 68 69 73 2c 20 27 5f 70 72 65 73 65 72 76 65 4f 70 65 6e 69 6e 67 44 | array(&$this,.'_preserveOpeningD |
5f20 | 65 6c 69 6d 69 74 65 72 27 29 2c 20 24 76 61 6c 75 65 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 | elimiter'),.$values............. |
5f40 | 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 | ............);.............}.... |
5f60 | 20 20 20 20 20 20 20 20 20 20 24 6f 75 74 65 72 20 3d 20 24 66 75 6e 63 52 65 70 6c 61 63 65 28 | ..........$outer.=.$funcReplace( |
5f80 | 24 72 65 67 73 2c 20 24 76 61 6c 75 65 73 2c 20 24 6f 75 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 | $regs,.$values,.$outer);........ |
5fa0 | 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 | ......if.($this->removeUnknownVa |
5fc0 | 72 69 61 62 6c 65 73 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 6f 75 74 65 | riables).{.................$oute |
5fe0 | 72 20 3d 20 70 72 65 67 5f 72 65 70 6c 61 63 65 28 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 56 61 | r.=.preg_replace($this->removeVa |
6000 | 72 69 61 62 6c 65 73 52 65 67 45 78 70 2c 20 22 22 2c 20 24 6f 75 74 65 72 29 3b 0a 20 20 20 20 | riablesRegExp,."",.$outer);..... |
6020 | 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 69 66 20 28 | ........}.........}.........if.( |
6040 | 24 65 6d 70 74 79 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 24 74 68 69 | $empty).{..............if.(!$thi |
6060 | 73 2d 3e 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 29 20 7b 0a 0a 20 20 20 20 20 20 20 | s->removeEmptyBlocks).{......... |
6080 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 62 6c 6f 63 6b | .........$this->blockdata[$block |
60a0 | 20 5d 2e 3d 20 24 6f 75 74 65 72 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 | .].=.$outer;..............}.else |
60c0 | 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 73 65 74 28 24 74 | .{..................if.(isset($t |
60e0 | 68 69 73 2d 3e 74 6f 75 63 68 65 64 42 6c 6f 63 6b 73 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a 20 | his->touchedBlocks[$block])).{.. |
6100 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 | ...................$this->blockd |
6120 | 61 74 61 5b 24 62 6c 6f 63 6b 5d 20 2e 3d 20 24 6f 75 74 65 72 3b 0a 20 20 20 20 20 20 20 20 20 | ata[$block]..=.$outer;.......... |
6140 | 20 20 20 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 74 6f 75 63 68 65 64 42 | ...........unset($this->touchedB |
6160 | 6c 6f 63 6b 73 5b 24 62 6c 6f 63 6b 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | locks[$block]);................. |
6180 | 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 | }..............}..........}.else |
61a0 | 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 | .{..............$this->blockdata |
61c0 | 5b 24 62 6c 6f 63 6b 5d 20 2e 3d 20 24 6f 75 74 65 72 3b 0a 0a 20 20 20 20 20 20 20 20 7d 0a 0a | [$block]..=.$outer;..........}.. |
61e0 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 65 6d 70 74 79 3b 0a 20 20 20 20 7d 20 2f 2f 20 | ........return.$empty;.....}.//. |
6200 | 65 6e 64 20 66 75 6e 63 20 70 61 72 73 65 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 50 | end.func.parse....../**......*.P |
6220 | 61 72 73 65 73 20 74 68 65 20 63 75 72 72 65 6e 74 20 62 6c 6f 63 6b 0a 20 20 20 20 20 2a 20 40 | arses.the.current.block......*.@ |
6240 | 73 65 65 20 20 20 20 20 20 70 61 72 73 65 28 29 2c 20 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 | see......parse(),.setCurrentBloc |
6260 | 6b 28 29 2c 20 24 63 75 72 72 65 6e 74 42 6c 6f 63 6b 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 | k(),.$currentBlock......*.@acces |
6280 | 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 | s...public......*/.....function. |
62a0 | 70 61 72 73 65 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 29 20 7b 0a 20 20 20 20 20 20 20 20 72 65 | parseCurrentBlock().{.........re |
62c0 | 74 75 72 6e 20 24 74 68 69 73 2d 3e 70 61 72 73 65 28 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 | turn.$this->parse($this->current |
62e0 | 42 6c 6f 63 6b 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 70 61 72 73 65 43 | Block);.....}.//.end.func.parseC |
6300 | 75 72 72 65 6e 74 42 6c 6f 63 6b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 53 65 74 73 | urrentBlock....../**......*.Sets |
6320 | 20 61 20 76 61 72 69 61 62 6c 65 20 76 61 6c 75 65 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a | .a.variable.value.......*......* |
6340 | 20 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 64 20 65 69 67 68 74 65 | .The.function.can.be.used.eighte |
6360 | 72 20 6c 69 6b 65 20 73 65 74 56 61 72 69 61 62 6c 65 28 20 22 76 61 72 6e 61 6d 65 22 2c 20 22 | r.like.setVariable(."varname",." |
6380 | 76 61 6c 75 65 22 29 0a 20 20 20 20 20 2a 20 6f 72 20 77 69 74 68 20 6f 6e 65 20 61 72 72 61 79 | value")......*.or.with.one.array |
63a0 | 20 24 76 61 72 69 61 62 6c 65 73 5b 22 76 61 72 6e 61 6d 65 22 5d 20 3d 20 22 76 61 6c 75 65 22 | .$variables["varname"].=."value" |
63c0 | 0a 20 20 20 20 20 2a 20 67 69 76 65 6e 20 73 65 74 56 61 72 69 61 62 6c 65 28 24 76 61 72 69 61 | ......*.given.setVariable($varia |
63e0 | 62 6c 65 73 29 20 71 75 69 74 65 20 6c 69 6b 65 20 70 68 70 6c 69 62 20 74 65 6d 70 6c 61 74 65 | bles).quite.like.phplib.template |
6400 | 73 20 73 65 74 5f 76 61 72 28 29 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 61 | s.set_var().......*......*.@para |
6420 | 6d 20 20 20 20 6d 69 78 65 64 20 20 20 20 20 73 74 72 69 6e 67 20 77 69 74 68 20 74 68 65 20 76 | m....mixed.....string.with.the.v |
6440 | 61 72 69 61 62 6c 65 20 6e 61 6d 65 20 6f 72 20 61 6e 20 61 72 72 61 79 0a 20 20 20 20 20 2a 20 | ariable.name.or.an.array......*. |
6460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 25 76 61 72 69 61 62 6c 65 73 5b 22 | ....................%variables[" |
6480 | 76 61 72 6e 61 6d 65 22 5d 20 3d 20 22 76 61 6c 75 65 22 0a 20 20 20 20 20 2a 20 40 70 61 72 61 | varname"].=."value"......*.@para |
64a0 | 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 76 61 72 69 | m....string....value.of.the.vari |
64c0 | 61 62 6c 65 20 6f 72 20 65 6d 70 74 79 20 69 66 20 24 76 61 72 69 61 62 6c 65 0a 20 20 20 20 20 | able.or.empty.if.$variable...... |
64e0 | 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 20 61 6e 20 61 72 72 61 | *.....................is.an.arra |
6500 | 79 2e 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 70 72 | y.......*.@param....string....pr |
6520 | 65 66 69 78 20 66 6f 72 20 76 61 72 69 61 62 6c 65 20 6e 61 6d 65 73 0a 20 20 20 20 20 2a 20 40 | efix.for.variable.names......*.@ |
6540 | 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 | access...public......*/.....func |
6560 | 74 69 6f 6e 20 73 65 74 56 61 72 69 61 62 6c 65 28 24 76 61 72 69 61 62 6c 65 2c 20 24 76 61 6c | tion.setVariable($variable,.$val |
6580 | 75 65 20 3d 20 22 22 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 73 5f 61 72 72 61 79 | ue.=."").{..........if.(is_array |
65a0 | 28 24 76 61 72 69 61 62 6c 65 29 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 | ($variable)).{..............$thi |
65c0 | 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 20 3d 20 61 72 72 61 79 5f 6d 65 72 67 65 28 0a | s->variableCache.=.array_merge(. |
65e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6600 | 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 | ............$this->variableCache |
6620 | 2c 20 24 76 61 72 69 61 62 6c 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,.$variable..................... |
6640 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c | ................);..........}.el |
6660 | 73 65 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c | se.{..............$this->variabl |
6680 | 65 43 61 63 68 65 5b 24 76 61 72 69 61 62 6c 65 5d 20 3d 20 24 76 61 6c 75 65 3b 0a 0a 20 20 20 | eCache[$variable].=.$value;..... |
66a0 | 20 20 20 20 20 7d 0a 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 73 65 74 56 61 72 | .....}......}.//.end.func.setVar |
66c0 | 69 61 62 6c 65 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 53 65 74 73 20 74 68 65 20 6e | iable....../**......*.Sets.the.n |
66e0 | 61 6d 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 62 6c 6f 63 6b 20 74 68 61 74 20 69 73 | ame.of.the.current.block.that.is |
6700 | 20 74 68 65 20 62 6c 6f 63 6b 20 77 68 65 72 65 20 76 61 72 69 61 62 6c 65 73 0a 20 20 20 20 20 | .the.block.where.variables...... |
6720 | 2a 20 61 72 65 20 61 64 64 65 64 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 61 | *.are.added.......*......*.@para |
6740 | 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 20 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f | m....string......name.of.the.blo |
6760 | 63 6b 0a 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 20 20 | ck......*.@return...boolean..... |
6780 | 66 61 6c 73 65 20 6f 6e 20 66 61 69 6c 75 72 65 2c 20 6f 74 68 65 72 77 69 73 65 20 74 72 75 65 | false.on.failure,.otherwise.true |
67a0 | 0a 20 20 20 20 20 2a 20 40 74 68 72 6f 77 73 20 20 20 50 45 41 52 5f 45 72 72 6f 72 0a 20 20 20 | ......*.@throws...PEAR_Error.... |
67c0 | 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a 20 20 20 | ..*.@access...public......*/.... |
67e0 | 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 24 62 6c 6f 63 6b | .function.setCurrentBlock($block |
6800 | 20 3d 20 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 | .=."__global__").{..........if.( |
6820 | 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d 29 | !isset($this->blocklist[$block]) |
6840 | 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 50 45 41 52 3a 3a 72 61 69 | ).{.............return.PEAR::rai |
6860 | 73 65 45 72 72 6f 72 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | seError(.................$this-> |
6880 | 65 72 72 6f 72 4d 65 73 73 61 67 65 28 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e 44 | errorMessage(.IT_BLOCK_NOT_FOUND |
68a0 | 20 29 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 22 27 20 2e 20 24 62 6c 6f 63 | .)...................'"'...$bloc |
68c0 | 6b 20 2e 20 22 27 22 2c 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e 44 0a 20 20 20 20 | k..."'",.IT_BLOCK_NOT_FOUND..... |
68e0 | 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 24 74 | ........);.........}..........$t |
6900 | 68 69 73 2d 3e 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 24 62 6c 6f 63 6b 3b 0a 0a 20 20 20 | his->currentBlock.=.$block;..... |
6920 | 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 | .....return.true;.....}.//.end.f |
6940 | 75 6e 63 20 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 | unc.setCurrentBlock....../**.... |
6960 | 20 20 2a 20 50 72 65 73 65 72 76 65 73 20 61 6e 20 65 6d 70 74 79 20 62 6c 6f 63 6b 20 65 76 65 | ..*.Preserves.an.empty.block.eve |
6980 | 6e 20 69 66 20 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 20 69 73 20 74 72 75 65 2e 0a | n.if.removeEmptyBlocks.is.true.. |
69a0 | 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 | .....*......*.@param....string.. |
69c0 | 20 20 20 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 0a 20 20 20 20 20 2a 20 40 72 65 | ....name.of.the.block......*.@re |
69e0 | 74 75 72 6e 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 20 20 66 61 6c 73 65 20 6f 6e 20 66 61 6c 73 | turn...boolean.....false.on.fals |
6a00 | 65 2c 20 6f 74 68 65 72 77 69 73 65 20 74 72 75 65 0a 20 20 20 20 20 2a 20 40 74 68 72 6f 77 73 | e,.otherwise.true......*.@throws |
6a20 | 20 20 20 50 45 41 52 5f 45 72 72 6f 72 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 | ...PEAR_Error......*.@access...p |
6a40 | 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 24 72 65 6d 6f 76 65 45 6d | ublic......*.@see......$removeEm |
6a60 | 70 74 79 42 6c 6f 63 6b 73 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 | ptyBlocks......*/.....function.t |
6a80 | 6f 75 63 68 42 6c 6f 63 6b 28 24 62 6c 6f 63 6b 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 | ouchBlock($block).{..........if. |
6aa0 | 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d | (!isset($this->blocklist[$block] |
6ac0 | 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 50 45 41 52 3a 3a 72 61 | )).{.............return.PEAR::ra |
6ae0 | 69 73 65 45 72 72 6f 72 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | iseError(.................$this- |
6b00 | 3e 65 72 72 6f 72 4d 65 73 73 61 67 65 28 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e | >errorMessage(.IT_BLOCK_NOT_FOUN |
6b20 | 44 20 29 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 22 27 20 2e 20 24 62 6c 6f | D.)...................'"'...$blo |
6b40 | 63 6b 20 2e 20 22 27 22 2c 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e 44 20 20 29 3b | ck..."'",.IT_BLOCK_NOT_FOUND..); |
6b60 | 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 6f 75 63 68 | .........}..........$this->touch |
6b80 | 65 64 42 6c 6f 63 6b 73 5b 24 62 6c 6f 63 6b 5d 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 | edBlocks[$block].=.true;........ |
6ba0 | 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 | ..return.true;.....}.//.end.func |
6bc0 | 20 74 6f 75 63 68 42 6c 6f 63 6b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6c 65 61 | .touchBlock....../**......*.Clea |
6be0 | 72 73 20 61 6c 6c 20 64 61 74 61 66 69 65 6c 64 73 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 20 | rs.all.datafields.of.the.object. |
6c00 | 61 6e 64 20 72 65 62 75 69 6c 64 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 62 6c 6f 63 6b 6c 69 | and.rebuild.the.internal.blockli |
6c20 | 73 74 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 4c 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 6c | st......*......*.LoadTemplatefil |
6c40 | 65 28 29 20 61 6e 64 20 73 65 74 54 65 6d 70 6c 61 74 65 28 29 20 61 75 74 6f 6d 61 74 69 63 61 | e().and.setTemplate().automatica |
6c60 | 6c 6c 79 20 63 61 6c 6c 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 0a 20 20 20 20 20 2a 20 77 68 | lly.call.this.function......*.wh |
6c80 | 65 6e 20 61 20 6e 65 77 20 74 65 6d 70 6c 61 74 65 20 69 73 20 67 69 76 65 6e 2e 20 44 6f 6e 27 | en.a.new.template.is.given..Don' |
6ca0 | 74 20 75 73 65 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 0a 20 20 20 20 20 2a 20 75 6e 6c 65 73 | t.use.this.function......*.unles |
6cc0 | 73 20 79 6f 75 20 6b 6e 6f 77 20 77 68 61 74 20 79 6f 75 27 72 65 20 64 6f 69 6e 67 2e 0a 20 20 | s.you.know.what.you're.doing.... |
6ce0 | 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 | ...*......*.@access...public.... |
6d00 | 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 66 72 65 65 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 | ..*.@see......free()......*/.... |
6d20 | 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 28 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 | .function.init().{..........$thi |
6d40 | 73 2d 3e 66 72 65 65 28 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 69 6e 64 42 6c | s->free();.........$this->findBl |
6d60 | 6f 63 6b 73 28 24 74 68 69 73 2d 3e 74 65 6d 70 6c 61 74 65 29 3b 0a 20 20 20 20 20 20 20 20 2f | ocks($this->template);........./ |
6d80 | 2f 20 77 65 20 64 6f 6e 27 74 20 6e 65 65 64 20 69 74 20 61 6e 79 20 6d 6f 72 65 0a 20 20 20 20 | /.we.don't.need.it.any.more..... |
6da0 | 20 20 20 20 24 74 68 69 73 2d 3e 74 65 6d 70 6c 61 74 65 20 3d 20 27 27 3b 0a 20 20 20 20 20 20 | ....$this->template.=.'';....... |
6dc0 | 20 20 24 74 68 69 73 2d 3e 62 75 69 6c 64 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 28 | ..$this->buildBlockvariablelist( |
6de0 | 29 3b 0a 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 69 6e 69 74 0a 0a 20 20 20 20 | );......}.//.end.func.init...... |
6e00 | 2f 2a 2a 0a 20 20 20 20 20 2a 20 43 6c 65 61 72 73 20 61 6c 6c 20 64 61 74 61 66 69 65 6c 64 73 | /**......*.Clears.all.datafields |
6e20 | 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 44 6f | .of.the.object.......*......*.Do |
6e40 | 6e 27 74 20 75 73 65 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 75 6e 6c 65 73 73 20 79 6f 75 | n't.use.this.function.unless.you |
6e60 | 20 6b 6e 6f 77 20 77 68 61 74 20 79 6f 75 27 72 65 20 64 6f 69 6e 67 2e 0a 20 20 20 20 20 2a 0a | .know.what.you're.doing.......*. |
6e80 | 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 20 40 | .....*.@access...public......*.@ |
6ea0 | 73 65 65 20 20 20 20 20 20 69 6e 69 74 28 29 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 | see......init()......*/.....func |
6ec0 | 74 69 6f 6e 20 66 72 65 65 28 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 65 72 | tion.free().{..........$this->er |
6ee0 | 72 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 75 72 | r.=.array();..........$this->cur |
6f00 | 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 3b 0a 0a 20 20 20 20 20 | rentBlock.=."__global__";....... |
6f20 | 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 20 20 20 20 3d 20 61 72 72 | ...$this->variableCache....=.arr |
6f40 | 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 6f 6f 6b 75 70 | ay();.........$this->blocklookup |
6f60 | 20 20 20 20 20 20 3d 20 61 72 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | ......=.array();.........$this-> |
6f80 | 74 6f 75 63 68 65 64 42 6c 6f 63 6b 73 20 20 20 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 | touchedBlocks....=.array();..... |
6fa0 | 20 20 20 20 20 24 74 68 69 73 2d 3e 66 6c 61 67 42 6c 6f 63 6b 74 72 6f 75 62 6c 65 20 3d 20 66 | .....$this->flagBlocktrouble.=.f |
6fc0 | 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 6c 61 67 47 6c 6f 62 61 6c 50 | alse;.........$this->flagGlobalP |
6fe0 | 61 72 73 65 64 20 3d 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e | arsed.=.false;......}.//.end.fun |
7000 | 63 20 66 72 65 65 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 53 65 74 73 20 74 68 65 20 | c.free....../**......*.Sets.the. |
7020 | 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 59 6f 75 20 63 61 6e 20 | template.......*......*.You.can. |
7040 | 65 69 67 68 74 65 72 20 6c 6f 61 64 20 61 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 20 66 72 6f | eighter.load.a.template.file.fro |
7060 | 6d 20 64 69 73 6b 20 77 69 74 68 0a 20 20 20 20 20 2a 20 4c 6f 61 64 54 65 6d 70 6c 61 74 65 66 | m.disk.with......*.LoadTemplatef |
7080 | 69 6c 65 28 29 20 6f 72 20 73 65 74 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6d 61 6e 75 61 6c | ile().or.set.the.template.manual |
70a0 | 6c 79 20 75 73 69 6e 67 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 2e 0a 20 20 20 20 20 2a 0a 20 | ly.using.this.function.......*.. |
70c0 | 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 20 20 | ....*.@param........string...... |
70e0 | 74 65 6d 70 6c 61 74 65 20 63 6f 6e 74 65 6e 74 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 | template.content......*.@param.. |
7100 | 20 20 20 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 20 20 72 65 6d 6f 76 65 20 75 6e 6b 6e 6f 77 6e | ......boolean.....remove.unknown |
7120 | 2f 75 6e 75 73 65 64 20 76 61 72 69 61 62 6c 65 73 3f 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d | /unused.variables?......*.@param |
7140 | 20 20 20 20 20 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 20 20 72 65 6d 6f 76 65 20 65 6d 70 74 79 | ........boolean.....remove.empty |
7160 | 20 62 6c 6f 63 6b 73 3f 0a 20 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 20 20 20 20 4c 6f | .blocks?......*.@see..........Lo |
7180 | 61 64 54 65 6d 70 6c 61 74 65 66 69 6c 65 28 29 2c 20 24 74 65 6d 70 6c 61 74 65 0a 20 20 20 20 | adTemplatefile(),.$template..... |
71a0 | 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a | .*.@access.......public......*/. |
71c0 | 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 54 65 6d 70 6c 61 74 65 28 20 24 74 65 6d 70 6c | ....function.setTemplate(.$templ |
71e0 | 61 74 65 2c 20 24 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 72 69 61 62 6c 65 73 20 3d 20 74 | ate,.$removeUnknownVariables.=.t |
7200 | 72 75 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 | rue,...........................$ |
7220 | 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 20 3d 20 74 72 75 65 0a 20 20 20 20 29 20 7b | removeEmptyBlocks.=.true.....).{ |
7240 | 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 | ..........$this->removeUnknownVa |
7260 | 72 69 61 62 6c 65 73 20 3d 20 24 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 72 69 61 62 6c 65 | riables.=.$removeUnknownVariable |
7280 | 73 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f | s;.........$this->removeEmptyBlo |
72a0 | 63 6b 73 20 3d 20 24 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 3b 0a 0a 20 20 20 20 20 | cks.=.$removeEmptyBlocks;....... |
72c0 | 20 20 20 69 66 20 28 22 22 20 3d 3d 20 24 74 65 6d 70 6c 61 74 65 20 26 26 20 24 74 68 69 73 2d | ...if.("".==.$template.&&.$this- |
72e0 | 3e 66 6c 61 67 43 61 63 68 65 54 65 6d 70 6c 61 74 65 66 69 6c 65 29 20 7b 0a 0a 20 20 20 20 20 | >flagCacheTemplatefile).{....... |
7300 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 20 3d 20 61 72 | .......$this->variableCache.=.ar |
7320 | 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 | ray();.............$this->blockd |
7340 | 61 74 61 20 3d 20 61 72 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 | ata.=.array();.............$this |
7360 | 2d 3e 74 6f 75 63 68 65 64 42 6c 6f 63 6b 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 20 20 20 20 20 | ->touchedBlocks.=.array();...... |
7380 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 75 72 72 65 6e 74 42 6c 6f 63 6b 20 3d 20 22 5f 5f | .......$this->currentBlock.=."__ |
73a0 | 67 6c 6f 62 61 6c 5f 5f 22 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 0a 20 20 | global__";..........}.else.{.... |
73c0 | 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 65 6d 70 6c 61 74 65 20 3d 20 27 3c 21 2d | ..........$this->template.=.'<!- |
73e0 | 2d 20 42 45 47 49 4e 20 5f 5f 67 6c 6f 62 61 6c 5f 5f 20 2d 2d 3e 27 20 2e 20 24 74 65 6d 70 6c | -.BEGIN.__global__.-->'...$templ |
7400 | 61 74 65 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ate............................. |
7420 | 20 20 20 20 27 3c 21 2d 2d 20 45 4e 44 20 5f 5f 67 6c 6f 62 61 6c 5f 5f 20 2d 2d 3e 27 3b 0a 20 | ....'<!--.END.__global__.-->';.. |
7440 | 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 69 6e 69 74 28 29 3b 0a 0a 20 20 20 20 20 | ...........$this->init();....... |
7460 | 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 66 6c 61 67 42 6c 6f | ...}..........if.($this->flagBlo |
7480 | 63 6b 74 72 6f 75 62 6c 65 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 | cktrouble).............return.fa |
74a0 | 6c 73 65 3b 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 7d | lse;..........return.true;.....} |
74c0 | 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 73 65 74 54 65 6d 70 6c 61 74 65 0a 0a 20 20 20 20 2f 2a | .//.end.func.setTemplate....../* |
74e0 | 2a 0a 20 20 20 20 20 2a 20 52 65 61 64 73 20 61 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 20 66 | *......*.Reads.a.template.file.f |
7500 | 72 6f 6d 20 74 68 65 20 64 69 73 6b 2e 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 | rom.the.disk.......*......*.@par |
7520 | 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 20 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 74 65 | am....string......name.of.the.te |
7540 | 6d 70 6c 61 74 65 20 66 69 6c 65 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 62 6f 6f | mplate.file......*.@param....boo |
7560 | 6c 20 20 20 20 20 20 20 20 68 6f 77 20 74 6f 20 68 61 6e 64 6c 65 20 75 6e 6b 6e 6f 77 6e 20 76 | l........how.to.handle.unknown.v |
7580 | 61 72 69 61 62 6c 65 73 2e 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 62 6f 6f 6c 20 | ariables.......*.@param....bool. |
75a0 | 20 20 20 20 20 20 20 68 6f 77 20 74 6f 20 68 61 6e 64 6c 65 20 65 6d 70 74 79 20 62 6c 6f 63 6b | .......how.to.handle.empty.block |
75c0 | 73 2e 0a 20 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 | s.......*.@access...public...... |
75e0 | 2a 20 40 72 65 74 75 72 6e 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 20 66 61 6c 73 65 20 6f 6e 20 | *.@return...boolean....false.on. |
7600 | 66 61 69 6c 75 72 65 2c 20 6f 74 68 65 72 77 69 73 65 20 74 72 75 65 0a 20 20 20 20 20 2a 20 40 | failure,.otherwise.true......*.@ |
7620 | 73 65 65 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 2c 20 73 65 74 54 65 6d 70 6c 61 74 65 28 | see......$template,.setTemplate( |
7640 | 29 2c 20 24 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 72 69 61 62 6c 65 73 2c 0a 20 20 20 20 | ),.$removeUnknownVariables,..... |
7660 | 20 2a 20 20 20 20 20 20 20 20 20 20 20 24 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 6b 73 0a | .*...........$removeEmptyBlocks. |
7680 | 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 61 64 54 65 6d 70 6c 61 74 | .....*/.....function.loadTemplat |
76a0 | 65 66 69 6c 65 28 20 24 66 69 6c 65 6e 61 6d 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | efile(.$filename,............... |
76c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 | .................$removeUnknownV |
76e0 | 61 72 69 61 62 6c 65 73 20 3d 20 74 72 75 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ariables.=.true,................ |
7700 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 6d 6f 76 65 45 6d 70 74 79 42 6c 6f 63 | ................$removeEmptyBloc |
7720 | 6b 73 20 3d 20 74 72 75 65 20 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 | ks.=.true.).{..........$template |
7740 | 20 3d 20 22 22 3b 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 24 74 68 69 73 2d 3e 66 6c 61 67 43 | .=."";.........if.(!$this->flagC |
7760 | 61 63 68 65 54 65 6d 70 6c 61 74 65 66 69 6c 65 20 7c 7c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | acheTemplatefile.||............. |
7780 | 24 74 68 69 73 2d 3e 6c 61 73 74 54 65 6d 70 6c 61 74 65 66 69 6c 65 20 21 3d 20 24 66 69 6c 65 | $this->lastTemplatefile.!=.$file |
77a0 | 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 29 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 65 6d | name.........){.............$tem |
77c0 | 70 6c 61 74 65 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 66 69 6c 65 28 24 66 69 6c 65 6e 61 6d 65 | plate.=.$this->getfile($filename |
77e0 | 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 6c 61 73 74 | );.........}.........$this->last |
7800 | 54 65 6d 70 6c 61 74 65 66 69 6c 65 20 3d 20 24 66 69 6c 65 6e 61 6d 65 3b 0a 0a 20 20 20 20 20 | Templatefile.=.$filename;....... |
7820 | 20 20 20 72 65 74 75 72 6e 20 24 74 65 6d 70 6c 61 74 65 21 3d 22 22 3f 0a 20 20 20 20 20 20 20 | ...return.$template!=""?........ |
7840 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 73 65 74 54 65 6d 70 6c 61 74 65 28 0a 20 20 20 | .........$this->setTemplate(.... |
7860 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 2c 24 | .....................$template,$ |
7880 | 72 65 6d 6f 76 65 55 6e 6b 6e 6f 77 6e 56 61 72 69 61 62 6c 65 73 2c 20 24 72 65 6d 6f 76 65 45 | removeUnknownVariables,.$removeE |
78a0 | 6d 70 74 79 42 6c 6f 63 6b 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 | mptyBlocks.....................) |
78c0 | 3a 66 61 6c 73 65 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 4c 6f 61 64 54 65 | :false;.....}.//.end.func.LoadTe |
78e0 | 6d 70 6c 61 74 65 66 69 6c 65 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 53 65 74 73 20 | mplatefile....../**......*.Sets. |
7900 | 74 68 65 20 66 69 6c 65 20 72 6f 6f 74 2e 20 54 68 65 20 66 69 6c 65 20 72 6f 6f 74 20 67 65 74 | the.file.root..The.file.root.get |
7920 | 73 20 70 72 65 66 69 78 65 64 20 74 6f 20 61 6c 6c 20 66 69 6c 65 6e 61 6d 65 73 20 70 61 73 73 | s.prefixed.to.all.filenames.pass |
7940 | 65 64 0a 20 20 20 20 20 2a 20 74 6f 20 74 68 65 20 6f 62 6a 65 63 74 2e 0a 20 20 20 20 20 2a 0a | ed......*.to.the.object.......*. |
7960 | 20 20 20 20 20 2a 20 4d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 79 6f 75 20 6f 76 65 72 72 69 | .....*.Make.sure.that.you.overri |
7980 | 64 65 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 77 68 65 6e 20 75 73 69 6e 67 20 74 68 65 20 | de.this.function.when.using.the. |
79a0 | 63 6c 61 73 73 0a 20 20 20 20 20 2a 20 6f 6e 20 77 69 6e 64 6f 77 73 2e 0a 20 20 20 20 20 2a 0a | class......*.on.windows.......*. |
79c0 | 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 20 40 | .....*.@param....string......*.@ |
79e0 | 73 65 65 20 20 20 20 20 20 49 6e 74 65 67 72 61 74 65 64 54 65 6d 70 6c 61 74 65 28 29 0a 20 20 | see......IntegratedTemplate()... |
7a00 | 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 20 2a 2f 0a 20 20 | ...*.@access...public......*/... |
7a20 | 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 52 6f 6f 74 28 24 72 6f 6f 74 29 20 7b 0a 0a 20 20 20 | ..function.setRoot($root).{..... |
7a40 | 20 20 20 20 20 69 66 20 28 22 22 20 21 3d 20 24 72 6f 6f 74 20 26 26 20 22 2f 22 20 21 3d 20 73 | .....if.("".!=.$root.&&."/".!=.s |
7a60 | 75 62 73 74 72 28 24 72 6f 6f 74 2c 20 2d 31 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 72 | ubstr($root,.-1)).............$r |
7a80 | 6f 6f 74 20 2e 3d 20 22 2f 22 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 69 6c 65 | oot..=."/";..........$this->file |
7aa0 | 52 6f 6f 74 20 3d 20 24 72 6f 6f 74 3b 0a 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 | Root.=.$root;......}.//.end.func |
7ac0 | 20 73 65 74 52 6f 6f 74 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 42 75 69 6c 64 20 61 | .setRoot....../**......*.Build.a |
7ae0 | 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 76 61 72 69 61 62 6c 65 73 20 77 69 74 68 69 6e 20 6f 66 | .list.of.all.variables.within.of |
7b00 | 20 61 20 62 6c 6f 63 6b 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 62 75 | .a.block......*/.....function.bu |
7b20 | 69 6c 64 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 28 29 20 7b 0a 0a 20 20 20 20 20 20 | ildBlockvariablelist().{........ |
7b40 | 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 20 61 73 20 24 | ..foreach.($this->blocklist.as.$ |
7b60 | 6e 61 6d 65 20 3d 3e 20 24 63 6f 6e 74 65 6e 74 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 | name.=>.$content).{............. |
7b80 | 70 72 65 67 5f 6d 61 74 63 68 5f 61 6c 6c 28 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 73 | preg_match_all(.$this->variables |
7ba0 | 52 65 67 45 78 70 2c 20 24 63 6f 6e 74 65 6e 74 2c 20 24 72 65 67 73 20 29 3b 0a 0a 20 20 20 20 | RegExp,.$content,.$regs.);...... |
7bc0 | 20 20 20 20 20 20 20 20 69 66 20 28 30 20 21 3d 20 63 6f 75 6e 74 28 24 72 65 67 73 5b 31 5d 29 | ........if.(0.!=.count($regs[1]) |
7be0 | 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 72 | ).{..................foreach.($r |
7c00 | 65 67 73 5b 31 5d 20 61 73 20 24 6b 20 3d 3e 20 24 76 61 72 29 0a 20 20 20 20 20 20 20 20 20 20 | egs[1].as.$k.=>.$var)........... |
7c20 | 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b | ..........$this->blockvariables[ |
7c40 | 24 6e 61 6d 65 5d 5b 24 76 61 72 5d 20 3d 20 74 72 75 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 | $name][$var].=.true;............ |
7c60 | 20 20 7d 20 65 6c 73 65 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 | ..}.else.{..................$thi |
7c80 | 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 6e 61 6d 65 5d 20 3d 20 61 72 72 61 79 | s->blockvariables[$name].=.array |
7ca0 | 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 | ();..............}..........}... |
7cc0 | 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 62 75 69 6c 64 42 6c 6f 63 6b 76 61 72 69 61 | ...}.//.end.func.buildBlockvaria |
7ce0 | 62 6c 65 6c 69 73 74 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 65 74 75 72 6e 73 20 | blelist....../**......*.Returns. |
7d00 | 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 67 6c 6f 62 61 6c 20 76 61 72 69 61 62 6c 65 73 0a 20 | a.list.of.all.global.variables.. |
7d20 | 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 47 6c 6f 62 61 6c 76 61 72 | ....*/.....function.getGlobalvar |
7d40 | 69 61 62 6c 65 73 28 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 24 72 65 67 73 20 20 20 3d 20 61 72 | iables().{..........$regs...=.ar |
7d60 | 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 24 76 61 6c 75 65 73 20 3d 20 61 72 72 61 79 28 29 | ray();.........$values.=.array() |
7d80 | 3b 0a 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b | ;..........foreach.($this->block |
7da0 | 76 61 72 69 61 62 6c 65 73 5b 22 5f 5f 67 6c 6f 62 61 6c 5f 5f 22 5d 20 61 73 20 24 61 6c 6c 6f | variables["__global__"].as.$allo |
7dc0 | 77 65 64 76 61 72 20 3d 3e 20 24 76 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | wedvar.=>.$v).{..............if. |
7de0 | 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b 24 61 6c 6c | (isset($this->variableCache[$all |
7e00 | 6f 77 65 64 76 61 72 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 72 65 | owedvar])).{.................$re |
7e20 | 67 73 5b 5d 20 20 20 3d 20 22 40 22 20 2e 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c | gs[]...=."@"...$this->openingDel |
7e40 | 69 6d 69 74 65 72 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | imiter.......................... |
7e60 | 20 20 20 20 20 24 61 6c 6c 6f 77 65 64 76 61 72 20 2e 20 24 74 68 69 73 2d 3e 63 6c 6f 73 69 6e | .....$allowedvar...$this->closin |
7e80 | 67 44 65 6c 69 6d 69 74 65 72 2e 22 40 22 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | gDelimiter."@";................. |
7ea0 | 24 76 61 6c 75 65 73 5b 5d 20 3d 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 | $values[].=.$this->variableCache |
7ec0 | 5b 24 61 6c 6c 6f 77 65 64 76 61 72 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 | [$allowedvar];.................u |
7ee0 | 6e 73 65 74 28 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b 24 61 6c 6c 6f 77 | nset($this->variableCache[$allow |
7f00 | 65 64 76 61 72 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | edvar]);.............}.......... |
7f20 | 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 72 72 61 79 28 24 72 65 67 73 2c 20 24 | }..........return.array($regs,.$ |
7f40 | 76 61 6c 75 65 73 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 67 65 74 47 6c | values);.....}.//.end.func.getGl |
7f60 | 6f 62 61 6c 76 61 72 69 61 62 6c 65 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 65 | obalvariables....../**......*.Re |
7f80 | 63 75 73 69 76 65 6c 79 20 62 75 69 6c 64 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 62 6c | cusively.builds.a.list.of.all.bl |
7fa0 | 6f 63 6b 73 20 77 69 74 68 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 20 2a | ocks.within.the.template.......* |
7fc0 | 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 73 74 72 69 | ......*.@param....string....stri |
7fe0 | 6e 67 20 74 68 61 74 20 67 65 74 73 20 73 63 61 6e 6e 65 64 0a 20 20 20 20 20 2a 20 40 73 65 65 | ng.that.gets.scanned......*.@see |
8000 | 20 20 20 20 20 20 24 62 6c 6f 63 6b 6c 69 73 74 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e | ......$blocklist......*/.....fun |
8020 | 63 74 69 6f 6e 20 66 69 6e 64 42 6c 6f 63 6b 73 28 24 73 74 72 69 6e 67 29 20 7b 0a 0a 20 20 20 | ction.findBlocks($string).{..... |
8040 | 20 20 20 20 20 24 62 6c 6f 63 6b 6c 69 73 74 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 | .....$blocklist.=.array();...... |
8060 | 20 20 20 20 69 66 20 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 70 72 65 67 5f 6d 61 74 63 68 5f | ....if.(.............preg_match_ |
8080 | 61 6c 6c 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 52 65 67 45 78 70 2c 20 24 73 74 72 69 6e 67 2c | all($this->blockRegExp,.$string, |
80a0 | 20 24 72 65 67 73 2c 20 50 52 45 47 5f 53 45 54 5f 4f 52 44 45 52 29 0a 20 20 20 20 20 20 20 20 | .$regs,.PREG_SET_ORDER)......... |
80c0 | 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 72 65 67 73 20 | ).{..............foreach.($regs. |
80e0 | 61 73 20 24 6b 20 3d 3e 20 24 6d 61 74 63 68 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 | as.$k.=>.$match).{.............. |
8100 | 20 20 20 20 24 62 6c 6f 63 6b 6e 61 6d 65 20 20 20 20 20 20 20 20 20 3d 20 24 6d 61 74 63 68 5b | ....$blockname.........=.$match[ |
8120 | 31 5d 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 62 6c 6f 63 6b 63 6f 6e 74 65 6e | 1];.................$blockconten |
8140 | 74 20 3d 20 24 6d 61 74 63 68 5b 32 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | t.=.$match[2];.................. |
8160 | 69 66 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 | if.(isset($this->blocklist[$bloc |
8180 | 6b 6e 61 6d 65 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 | kname])).{.....................$ |
81a0 | 74 68 69 73 2d 3e 65 72 72 5b 5d 20 3d 20 50 45 41 52 3a 3a 72 61 69 73 65 45 72 72 6f 72 28 0a | this->err[].=.PEAR::raiseError(. |
81c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
81e0 | 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 65 72 72 6f 72 4d 65 73 73 61 67 65 28 | ............$this->errorMessage( |
8200 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
8220 | 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 42 4c 4f 43 4b 5f 44 55 50 4c 49 43 41 54 45 20 | .............IT_BLOCK_DUPLICATE. |
8240 | 29 20 2e 20 27 22 27 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | )...'"'......................... |
8260 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 62 6c 6f 63 6b 6e 61 6d 65 | ......................$blockname |
8280 | 20 2e 20 22 27 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..."'",......................... |
82a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 42 4c 4f 43 4b 5f 44 55 50 | ....................IT_BLOCK_DUP |
82c0 | 4c 49 43 41 54 45 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | LICATE.......................... |
82e0 | 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...........);................... |
8300 | 20 20 24 74 68 69 73 2d 3e 66 6c 61 67 42 6c 6f 63 6b 74 72 6f 75 62 6c 65 20 3d 20 74 72 75 65 | ..$this->flagBlocktrouble.=.true |
8320 | 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 | ;.................}............. |
8340 | 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 6e 61 6d 65 | .....$this->blocklist[$blockname |
8360 | 5d 20 3d 20 24 62 6c 6f 63 6b 63 6f 6e 74 65 6e 74 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ].=.$blockcontent;.............. |
8380 | 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 62 6c 6f 63 6b 6e 61 6d 65 5d 20 | ...$this->blockdata[$blockname]. |
83a0 | 3d 20 22 22 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 62 6c 6f 63 6b 6c 69 73 | =."";..................$blocklis |
83c0 | 74 5b 5d 20 3d 20 24 62 6c 6f 63 6b 6e 61 6d 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | t[].=.$blockname;............... |
83e0 | 20 20 20 24 69 6e 6e 65 72 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 42 6c 6f 63 6b 73 28 24 62 | ...$inner.=.$this->findBlocks($b |
8400 | 6c 6f 63 6b 63 6f 6e 74 65 6e 74 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f | lockcontent);.................fo |
8420 | 72 65 61 63 68 20 28 24 69 6e 6e 65 72 20 61 73 20 24 6b 20 3d 3e 20 24 6e 61 6d 65 29 20 7b 0a | reach.($inner.as.$k.=>.$name).{. |
8440 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 70 61 74 74 65 72 6e 20 3d 20 | .....................$pattern.=. |
8460 | 73 70 72 69 6e 74 66 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | sprintf(........................ |
8480 | 20 27 40 3c 21 2d 2d 5c 73 2b 42 45 47 49 4e 5c 73 2b 25 73 5c 73 2b 2d 2d 3e 28 2e 2a 29 3c 21 | .'@<!--\s+BEGIN\s+%s\s+-->(.*)<! |
84a0 | 2d 2d 5c 73 2b 45 4e 44 5c 73 2b 25 73 5c 73 2b 2d 2d 3e 40 73 6d 27 2c 0a 20 20 20 20 20 20 20 | --\s+END\s+%s\s+-->@sm',........ |
84c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 6e 61 6d 65 2c 0a 20 20 20 20 20 20 20 20 | .................$name,......... |
84e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 6e 61 6d 65 0a 20 20 20 20 20 20 20 20 20 20 | ................$name........... |
8500 | 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........);.................... |
8520 | 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 6e 61 6d 65 5d 20 3d | ..$this->blocklist[$blockname].= |
8540 | 20 70 72 65 67 5f 72 65 70 6c 61 63 65 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .preg_replace(.................. |
8560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 70 61 74 74 65 72 6e 2c | .......................$pattern, |
8580 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
85a0 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 | .........$this->openingDelimiter |
85c0 | 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
85e0 | 20 20 20 20 20 20 20 20 20 20 20 22 5f 5f 22 20 2e 20 24 6e 61 6d 65 20 2e 20 22 5f 5f 22 20 2e | ..........."__"...$name..."__".. |
8600 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
8620 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 | .........$this->closingDelimiter |
8640 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
8660 | 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 | ..........$this->blocklist[$bloc |
8680 | 6b 6e 61 6d 65 5d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | kname].......................... |
86a0 | 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 | ......);.....................$th |
86c0 | 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 6e 61 6d 65 5d 5b 5d 20 3d 20 24 | is->blockinner[$blockname][].=.$ |
86e0 | 6e 61 6d 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | name;.....................$this- |
8700 | 3e 62 6c 6f 63 6b 70 61 72 65 6e 74 73 5b 24 6e 61 6d 65 5d 20 3d 20 24 62 6c 6f 63 6b 6e 61 6d | >blockparents[$name].=.$blocknam |
8720 | 65 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 | e;..................}........... |
8740 | 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 | ...}..........}..........return. |
8760 | 24 62 6c 6f 63 6b 6c 69 73 74 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 66 69 | $blocklist;.....}.//.end.func.fi |
8780 | 6e 64 42 6c 6f 63 6b 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 65 61 64 73 20 61 | ndBlocks....../**......*.Reads.a |
87a0 | 20 66 69 6c 65 20 66 72 6f 6d 20 64 69 73 6b 20 61 6e 64 20 72 65 74 75 72 6e 73 20 69 74 73 20 | .file.from.disk.and.returns.its. |
87c0 | 63 6f 6e 74 65 6e 74 2e 0a 20 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 | content.......*.@param....string |
87e0 | 20 20 20 20 46 69 6c 65 6e 61 6d 65 0a 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 73 74 | ....Filename......*.@return...st |
8800 | 72 69 6e 67 20 20 20 20 46 69 6c 65 63 6f 6e 74 65 6e 74 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 | ring....Filecontent......*/..... |
8820 | 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 69 6c 65 28 24 66 69 6c 65 6e 61 6d 65 29 20 7b 0a 0a 20 | function.getFile($filename).{... |
8840 | 20 20 20 20 20 20 20 69 66 20 28 22 2f 22 20 3d 3d 20 24 66 69 6c 65 6e 61 6d 65 7b 30 7d 20 26 | .......if.("/".==.$filename{0}.& |
8860 | 26 20 22 2f 22 20 3d 3d 20 73 75 62 73 74 72 28 24 74 68 69 73 2d 3e 66 69 6c 65 52 6f 6f 74 2c | &."/".==.substr($this->fileRoot, |
8880 | 20 2d 31 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 66 69 6c 65 6e 61 6d 65 20 3d 20 73 75 | .-1)).............$filename.=.su |
88a0 | 62 73 74 72 28 24 66 69 6c 65 6e 61 6d 65 2c 20 31 29 3b 0a 0a 20 20 20 20 20 20 20 20 24 66 69 | bstr($filename,.1);..........$fi |
88c0 | 6c 65 6e 61 6d 65 20 3d 20 24 74 68 69 73 2d 3e 66 69 6c 65 52 6f 6f 74 20 2e 20 24 66 69 6c 65 | lename.=.$this->fileRoot...$file |
88e0 | 6e 61 6d 65 3b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 28 24 66 68 20 3d 20 40 66 6f 70 65 | name;..........if.(!($fh.=.@fope |
8900 | 6e 28 24 66 69 6c 65 6e 61 6d 65 2c 20 22 72 22 29 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | n($filename,."r"))).{........... |
8920 | 20 20 24 74 68 69 73 2d 3e 65 72 72 5b 5d 20 3d 20 50 45 41 52 3a 3a 72 61 69 73 65 45 72 72 6f | ..$this->err[].=.PEAR::raiseErro |
8940 | 72 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 | r(.........................$this |
8960 | 2d 3e 65 72 72 6f 72 4d 65 73 73 61 67 65 28 49 54 5f 54 50 4c 5f 4e 4f 54 5f 46 4f 55 4e 44 29 | ->errorMessage(IT_TPL_NOT_FOUND) |
8980 | 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 3a 20 22 27 | ...........................':."' |
89a0 | 20 2e 24 66 69 6c 65 6e 61 6d 65 20 2e 27 22 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..$filename..'"',............... |
89c0 | 20 20 20 20 20 20 20 20 20 20 49 54 5f 54 50 4c 5f 4e 4f 54 5f 46 4f 55 4e 44 0a 20 20 20 20 20 | ..........IT_TPL_NOT_FOUND...... |
89e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | ...............);.............re |
8a00 | 74 75 72 6e 20 22 22 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 24 63 6f 6e | turn."";.........}..........$con |
8a20 | 74 65 6e 74 20 3d 20 66 72 65 61 64 28 24 66 68 2c 20 66 69 6c 65 73 69 7a 65 28 24 66 69 6c 65 | tent.=.fread($fh,.filesize($file |
8a40 | 6e 61 6d 65 29 29 3b 0a 20 20 20 20 20 20 20 20 66 63 6c 6f 73 65 28 24 66 68 29 3b 0a 0a 20 20 | name));.........fclose($fh);.... |
8a60 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 65 67 5f 72 65 70 6c 61 63 65 28 0a 20 20 20 20 20 | ......return.preg_replace(...... |
8a80 | 20 20 20 20 20 20 20 22 23 3c 21 2d 2d 20 49 4e 43 4c 55 44 45 20 28 2e 2a 29 20 2d 2d 3e 23 69 | ......."#<!--.INCLUDE.(.*).-->#i |
8aa0 | 6d 65 22 2c 20 22 5c 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 65 28 27 5c 5c 31 27 29 22 2c 20 24 | me",."\$this->getFile('\\1')",.$ |
8ac0 | 63 6f 6e 74 65 6e 74 0a 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 | content.........);.....}.//.end. |
8ae0 | 66 75 6e 63 20 67 65 74 46 69 6c 65 0a 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 41 64 | func.getFile......./**......*.Ad |
8b00 | 64 73 20 64 65 6c 69 6d 69 74 65 72 73 20 74 6f 20 61 20 73 74 72 69 6e 67 2c 20 73 6f 20 69 74 | ds.delimiters.to.a.string,.so.it |
8b20 | 20 63 61 6e 20 62 65 20 75 73 65 64 20 61 73 20 61 20 70 61 74 74 65 72 6e 0a 20 20 20 20 20 2a | .can.be.used.as.a.pattern......* |
8b40 | 20 69 6e 20 70 72 65 67 5f 2a 20 66 75 6e 63 74 69 6f 6e 73 0a 20 20 20 20 20 2a 0a 20 20 20 20 | .in.preg_*.functions......*..... |
8b60 | 20 2a 20 40 70 61 72 61 6d 20 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 | .*.@param.string......*.@return. |
8b80 | 73 74 72 69 6e 67 0a 20 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 5f 61 64 64 | string......*/.....function._add |
8ba0 | 50 72 65 67 44 65 6c 69 6d 69 74 65 72 73 28 24 73 74 72 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 | PregDelimiters($str).....{...... |
8bc0 | 20 20 20 72 65 74 75 72 6e 20 27 40 27 20 2e 20 24 73 74 72 20 2e 20 27 40 27 3b 0a 20 20 20 20 | ...return.'@'...$str...'@';..... |
8be0 | 7d 0a 0a 0a 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 70 6c 61 63 65 73 20 61 6e 20 6f 70 65 | }....../**.....*.Replaces.an.ope |
8c00 | 6e 69 6e 67 20 64 65 6c 69 6d 69 74 65 72 20 62 79 20 61 20 73 70 65 63 69 61 6c 20 73 74 72 69 | ning.delimiter.by.a.special.stri |
8c20 | 6e 67 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 73 74 72 69 6e 67 0a 20 20 20 | ng.....*.....*.@param.string.... |
8c40 | 20 2a 20 40 72 65 74 75 72 6e 20 73 74 72 69 6e 67 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e | .*.@return.string.....*/.....fun |
8c60 | 63 74 69 6f 6e 20 5f 70 72 65 73 65 72 76 65 4f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 28 | ction._preserveOpeningDelimiter( |
8c80 | 24 73 74 72 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 28 66 61 6c 73 | $str).....{.........return.(fals |
8ca0 | 65 20 3d 3d 3d 20 73 74 72 70 6f 73 28 24 73 74 72 2c 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e | e.===.strpos($str,.$this->openin |
8cc0 | 67 44 65 6c 69 6d 69 74 65 72 29 29 3f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 73 | gDelimiter))?.................$s |
8ce0 | 74 72 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 5f 72 65 70 6c 61 63 65 28 | tr:.................str_replace( |
8d00 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 6f 70 65 6e | .....................$this->open |
8d20 | 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ingDelimiter,................... |
8d40 | 20 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 0a 20 20 20 20 | ..$this->openingDelimiter....... |
8d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 25 70 72 65 73 65 72 76 65 64 25 27 20 2e 20 | ................'%preserved%'... |
8d80 | 24 74 68 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 0a 20 20 20 20 20 20 20 | $this->closingDelimiter,........ |
8da0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 24 73 74 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .............$str............... |
8dc0 | 20 20 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 20 2a 20 52 65 74 75 72 | ..);.....}....../**......*.Retur |
8de0 | 6e 20 61 20 74 65 78 74 75 61 6c 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 66 6f 72 20 61 20 | n.a.textual.error.message.for.a. |
8e00 | 49 54 20 65 72 72 6f 72 20 63 6f 64 65 0a 20 20 20 20 20 2a 0a 20 20 20 20 20 2a 20 40 70 61 72 | IT.error.code......*......*.@par |
8e20 | 61 6d 20 69 6e 74 65 67 65 72 20 24 76 61 6c 75 65 20 65 72 72 6f 72 20 63 6f 64 65 0a 20 20 20 | am.integer.$value.error.code.... |
8e40 | 20 20 2a 0a 20 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 73 74 72 69 6e 67 20 65 72 72 6f 72 20 | ..*......*.@return.string.error. |
8e60 | 6d 65 73 73 61 67 65 2c 20 6f 72 20 66 61 6c 73 65 20 69 66 20 74 68 65 20 65 72 72 6f 72 20 63 | message,.or.false.if.the.error.c |
8e80 | 6f 64 65 20 77 61 73 0a 20 20 20 20 20 2a 20 6e 6f 74 20 72 65 63 6f 67 6e 69 7a 65 64 0a 20 20 | ode.was......*.not.recognized... |
8ea0 | 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 65 72 72 6f 72 4d 65 73 73 61 67 65 28 | ...*/.....function.errorMessage( |
8ec0 | 24 76 61 6c 75 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 73 74 61 74 69 63 20 24 65 72 | $value).....{.........static.$er |
8ee0 | 72 6f 72 4d 65 73 73 61 67 65 73 3b 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 73 65 74 28 | rorMessages;.........if.(!isset( |
8f00 | 24 65 72 72 6f 72 4d 65 73 73 61 67 65 73 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 | $errorMessages)).{.............$ |
8f20 | 65 72 72 6f 72 4d 65 73 73 61 67 65 73 20 3d 20 61 72 72 61 79 28 0a 20 20 20 20 20 20 20 20 20 | errorMessages.=.array(.......... |
8f40 | 20 20 20 20 20 20 20 49 54 5f 4f 4b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .......IT_OK.................... |
8f60 | 20 20 20 3d 3e 20 27 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 45 52 52 | ...=>.'',.................IT_ERR |
8f80 | 4f 52 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3d 3e 20 27 75 6e 6b 6e 6f 77 | OR....................=>.'unknow |
8fa0 | 6e 20 65 72 72 6f 72 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 54 50 4c | n.error',.................IT_TPL |
8fc0 | 5f 4e 4f 54 5f 46 4f 55 4e 44 20 20 20 20 20 20 20 20 20 20 20 20 3d 3e 20 27 43 61 6e 6e 6f 74 | _NOT_FOUND............=>.'Cannot |
8fe0 | 20 72 65 61 64 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 27 2c 0a 20 20 20 20 20 20 | .read.the.template.file',....... |
9000 | 20 20 20 20 20 20 20 20 20 20 49 54 5f 42 4c 4f 43 4b 5f 4e 4f 54 5f 46 4f 55 4e 44 20 20 20 20 | ..........IT_BLOCK_NOT_FOUND.... |
9020 | 20 20 20 20 20 20 3d 3e 20 27 43 61 6e 6e 6f 74 20 66 69 6e 64 20 74 68 69 73 20 62 6c 6f 63 6b | ......=>.'Cannot.find.this.block |
9040 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 54 5f 42 4c 4f 43 4b 5f 44 55 50 4c | ',.................IT_BLOCK_DUPL |
9060 | 49 43 41 54 45 20 20 20 20 20 20 20 20 20 20 3d 3e 20 27 54 68 65 20 6e 61 6d 65 20 6f 66 20 61 | ICATE..........=>.'The.name.of.a |
9080 | 20 62 6c 6f 63 6b 20 6d 75 73 74 20 62 65 27 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .block.must.be'................. |
90a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
90c0 | 27 20 75 6e 69 71 75 65 77 69 74 68 69 6e 20 61 20 74 65 6d 70 6c 61 74 65 2e 27 2e 0a 20 20 20 | '.uniquewithin.a.template.'..... |
90e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9100 | 20 20 20 20 20 20 20 20 20 20 20 20 27 20 46 6f 75 6e 64 20 22 24 62 6c 6f 63 6b 6e 61 6d 65 22 | ............'.Found."$blockname" |
9120 | 20 74 77 69 63 65 2e 27 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .twice.'........................ |
9140 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 55 6e 70 72 65 64 | .........................'Unpred |
9160 | 69 63 74 61 62 6c 65 20 72 65 73 75 6c 74 73 20 27 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | ictable.results.'............... |
9180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
91a0 | 20 20 27 6d 61 79 20 61 70 70 65 61 72 2e 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..'may.appear.',................ |
91c0 | 20 49 54 5f 55 4e 4b 4e 4f 57 4e 5f 4f 50 54 49 4f 4e 20 20 20 20 20 20 20 20 20 20 20 3d 3e 20 | .IT_UNKNOWN_OPTION...........=>. |
91e0 | 27 55 6e 6b 6e 6f 77 6e 20 6f 70 74 69 6f 6e 27 0a 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a | 'Unknown.option'.............);. |
9200 | 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 | ........}..........if.(PEAR::isE |
9220 | 72 72 6f 72 28 24 76 61 6c 75 65 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 76 61 6c | rror($value)).{.............$val |
9240 | 75 65 20 3d 20 24 76 61 6c 75 65 2d 3e 67 65 74 43 6f 64 65 28 29 3b 0a 20 20 20 20 20 20 20 20 | ue.=.$value->getCode();......... |
9260 | 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 73 73 65 74 28 24 65 72 72 6f 72 4d 65 | }..........return.isset($errorMe |
9280 | 73 73 61 67 65 73 5b 24 76 61 6c 75 65 5d 29 20 3f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ssages[$value]).?............... |
92a0 | 20 20 24 65 72 72 6f 72 4d 65 73 73 61 67 65 73 5b 24 76 61 6c 75 65 5d 20 3a 20 24 65 72 72 6f | ..$errorMessages[$value].:.$erro |
92c0 | 72 4d 65 73 73 61 67 65 73 5b 49 54 5f 45 52 52 4f 52 5d 3b 0a 20 20 20 20 7d 0a 7d 20 2f 2f 20 | rMessages[IT_ERROR];.....}.}.//. |
92e0 | 65 6e 64 20 63 6c 61 73 73 20 49 6e 74 65 67 72 61 74 65 64 54 65 6d 70 6c 61 74 65 0a 3f 3e 00 | end.class.IntegratedTemplate.?>. |
9300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
93a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
93c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
93e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9400 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 49 54 58 2e 70 68 70 00 00 00 00 | HTML_Template_IT-1.1/ITX.php.... |
9420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9460 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
9480 | 20 20 36 34 34 30 34 20 20 37 36 33 33 35 31 35 32 31 34 20 20 31 30 37 30 30 20 00 00 00 00 00 | ..64404..7633515214..10700...... |
94a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
94c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
94e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
95a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
95c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
95e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9600 | 3c 3f 70 68 70 0a 2f 2f 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | <?php.//.//.+------------------- |
9620 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
9640 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 20 7c 20 50 48 50 20 76 65 | -------------------+.//.|.PHP.ve |
9660 | 72 73 69 6f 6e 20 34 2e 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rsion.4.0....................... |
9680 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c | ...............................| |
96a0 | 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | .//.+--------------------------- |
96c0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
96e0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 20 7c 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 | -----------+.//.|.Copyright.(c). |
9700 | 31 39 39 37 2d 32 30 30 31 20 54 68 65 20 50 48 50 20 47 72 6f 75 70 20 20 20 20 20 20 20 20 20 | 1997-2001.The.PHP.Group......... |
9720 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d | .......................|.//.+--- |
9740 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
9760 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
9780 | 2d 2d 2d 2b 0a 2f 2f 20 7c 20 54 68 69 73 20 73 6f 75 72 63 65 20 66 69 6c 65 20 69 73 20 73 75 | ---+.//.|.This.source.file.is.su |
97a0 | 62 6a 65 63 74 20 74 6f 20 76 65 72 73 69 6f 6e 20 32 2e 30 32 20 6f 66 20 74 68 65 20 50 48 50 | bject.to.version.2.02.of.the.PHP |
97c0 | 20 6c 69 63 65 6e 73 65 2c 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 74 68 61 74 20 69 73 20 62 75 | .license,......|.//.|.that.is.bu |
97e0 | 6e 64 6c 65 64 20 77 69 74 68 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 69 6e 20 74 68 65 20 66 | ndled.with.this.package.in.the.f |
9800 | 69 6c 65 20 4c 49 43 45 4e 53 45 2c 20 61 6e 64 20 69 73 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 | ile.LICENSE,.and.is........|.//. |
9820 | 7c 20 61 76 61 69 6c 61 62 6c 65 20 61 74 20 74 68 72 6f 75 67 68 20 74 68 65 20 77 6f 72 6c 64 | |.available.at.through.the.world |
9840 | 2d 77 69 64 65 2d 77 65 62 20 61 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | -wide-web.at.................... |
9860 | 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 68 74 74 70 3a 2f 2f 77 77 77 2e 70 68 70 2e 6e 65 74 | .......|.//.|.http://www.php.net |
9880 | 2f 6c 69 63 65 6e 73 65 2f 32 5f 30 32 2e 74 78 74 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /license/2_02.txt............... |
98a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 49 66 20 79 6f 75 | ...................|.//.|.If.you |
98c0 | 20 64 69 64 20 6e 6f 74 20 72 65 63 65 69 76 65 20 61 20 63 6f 70 79 20 6f 66 20 74 68 65 20 50 | .did.not.receive.a.copy.of.the.P |
98e0 | 48 50 20 6c 69 63 65 6e 73 65 20 61 6e 64 20 61 72 65 20 75 6e 61 62 6c 65 20 74 6f 20 20 20 7c | HP.license.and.are.unable.to...| |
9900 | 0a 2f 2f 20 7c 20 6f 62 74 61 69 6e 20 69 74 20 74 68 72 6f 75 67 68 20 74 68 65 20 77 6f 72 6c | .//.|.obtain.it.through.the.worl |
9920 | 64 2d 77 69 64 65 2d 77 65 62 2c 20 70 6c 65 61 73 65 20 73 65 6e 64 20 61 20 6e 6f 74 65 20 74 | d-wide-web,.please.send.a.note.t |
9940 | 6f 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 6c 69 63 65 6e 73 65 40 70 68 70 2e 6e 65 | o..........|.//.|.license@php.ne |
9960 | 74 20 73 6f 20 77 65 20 63 61 6e 20 6d 61 69 6c 20 79 6f 75 20 61 20 63 6f 70 79 20 69 6d 6d 65 | t.so.we.can.mail.you.a.copy.imme |
9980 | 64 69 61 74 65 6c 79 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d | diately................|.//.+--- |
99a0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
99c0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
99e0 | 2d 2d 2d 2b 0a 2f 2f 20 7c 20 41 75 74 68 6f 72 3a 20 55 6c 66 20 57 65 6e 64 65 6c 20 3c 75 6c | ---+.//.|.Author:.Ulf.Wendel.<ul |
9a00 | 66 2e 77 65 6e 64 65 6c 40 70 68 70 64 6f 63 2e 64 65 3e 20 20 20 20 20 20 20 20 20 20 20 20 20 | f.wendel@phpdoc.de>............. |
9a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ...............|.//.+----------- |
9a40 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
9a60 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 0a | ---------------------------+.//. |
9a80 | 2f 2f 20 24 49 64 3a 20 49 54 58 2e 70 68 70 2c 76 20 31 2e 38 20 32 30 30 33 2f 30 33 2f 31 32 | //.$Id:.ITX.php,v.1.8.2003/03/12 |
9aa0 | 20 30 32 3a 32 35 3a 31 36 20 70 61 6a 6f 79 65 20 45 78 70 20 24 0a 2f 2f 0a 0a 72 65 71 75 69 | .02:25:16.pajoye.Exp.$.//..requi |
9ac0 | 72 65 5f 6f 6e 63 65 28 27 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 2f 49 54 2e 70 68 70 27 29 3b | re_once('HTML/Template/IT.php'); |
9ae0 | 0a 72 65 71 75 69 72 65 5f 6f 6e 63 65 20 27 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 2f 49 54 5f | .require_once.'HTML/Template/IT_ |
9b00 | 45 72 72 6f 72 2e 70 68 70 27 3b 0a 0a 2f 2a 2a 0a 2a 20 49 6e 74 65 67 72 61 74 65 64 20 54 65 | Error.php';../**.*.Integrated.Te |
9b20 | 6d 70 6c 61 74 65 20 45 78 74 65 6e 73 69 6f 6e 20 2d 20 49 54 58 0a 2a 0a 2a 20 57 69 74 68 20 | mplate.Extension.-.ITX.*.*.With. |
9b40 | 74 68 69 73 20 63 6c 61 73 73 20 79 6f 75 20 67 65 74 20 74 68 65 20 66 75 6c 6c 20 70 6f 77 65 | this.class.you.get.the.full.powe |
9b60 | 72 20 6f 66 20 74 68 65 20 70 68 70 6c 69 62 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 73 73 2e 0a | r.of.the.phplib.template.class.. |
9b80 | 2a 20 59 6f 75 20 6d 61 79 20 68 61 76 65 20 6f 6e 65 20 66 69 6c 65 20 77 69 74 68 20 62 6c 6f | *.You.may.have.one.file.with.blo |
9ba0 | 63 6b 73 20 69 6e 20 69 74 20 62 75 74 20 79 6f 75 20 68 61 76 65 20 61 73 20 77 65 6c 6c 20 6f | cks.in.it.but.you.have.as.well.o |
9bc0 | 6e 65 20 6d 61 69 6e 20 66 69 6c 65 0a 2a 20 61 6e 64 20 6d 75 6c 74 69 70 6c 65 20 66 69 6c 65 | ne.main.file.*.and.multiple.file |
9be0 | 73 20 6f 6e 65 20 66 6f 72 20 65 61 63 68 20 62 6c 6f 63 6b 2e 20 54 68 69 73 20 69 73 20 71 75 | s.one.for.each.block..This.is.qu |
9c00 | 69 74 65 20 75 73 65 66 75 6c 6c 20 77 68 65 6e 20 79 6f 75 20 68 61 76 65 0a 2a 20 75 73 65 72 | ite.usefull.when.you.have.*.user |
9c20 | 20 63 6f 6e 66 69 67 75 72 61 62 6c 65 20 77 65 62 73 69 74 65 73 2e 20 55 73 69 6e 67 20 62 6c | .configurable.websites..Using.bl |
9c40 | 6f 63 6b 73 20 6e 6f 74 20 69 6e 20 74 68 65 20 6d 61 69 6e 20 74 65 6d 70 6c 61 74 65 20 61 6c | ocks.not.in.the.main.template.al |
9c60 | 6c 6f 77 73 0a 2a 20 79 6f 75 20 74 6f 20 6d 6f 64 69 66 79 20 73 6f 6d 65 20 70 61 72 74 73 20 | lows.*.you.to.modify.some.parts. |
9c80 | 6f 66 20 79 6f 75 72 20 6c 61 79 6f 75 74 20 65 61 73 69 6c 79 2e 0a 2a 0a 2a 20 4e 6f 74 65 20 | of.your.layout.easily..*.*.Note. |
9ca0 | 74 68 61 74 20 79 6f 75 20 63 61 6e 20 72 65 70 6c 61 63 65 20 61 6e 20 65 78 69 73 74 69 6e 67 | that.you.can.replace.an.existing |
9cc0 | 20 62 6c 6f 63 6b 20 61 6e 64 20 61 64 64 20 6e 65 77 20 62 6c 6f 63 6b 73 20 61 74 20 72 75 6e | .block.and.add.new.blocks.at.run |
9ce0 | 74 69 6d 65 2e 0a 2a 20 41 64 64 69 6e 67 20 6e 65 77 20 62 6c 6f 63 6b 73 20 6d 65 61 6e 73 20 | time..*.Adding.new.blocks.means. |
9d00 | 63 68 61 6e 67 69 6e 67 20 61 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 | changing.a.variable.placeholder. |
9d20 | 74 6f 20 61 20 62 6c 6f 63 6b 2e 0a 2a 0a 2a 20 40 61 75 74 68 6f 72 20 20 20 55 6c 66 20 57 65 | to.a.block..*.*.@author...Ulf.We |
9d40 | 6e 64 65 6c 20 3c 75 77 40 6e 65 74 75 73 65 2e 64 65 3e 0a 2a 20 40 61 63 63 65 73 73 20 20 20 | ndel.<uw@netuse.de>.*.@access... |
9d60 | 70 75 62 6c 69 63 0a 2a 20 40 76 65 72 73 69 6f 6e 20 20 24 49 64 3a 20 49 54 58 2e 70 68 70 2c | public.*.@version..$Id:.ITX.php, |
9d80 | 76 20 31 2e 38 20 32 30 30 33 2f 30 33 2f 31 32 20 30 32 3a 32 35 3a 31 36 20 70 61 6a 6f 79 65 | v.1.8.2003/03/12.02:25:16.pajoye |
9da0 | 20 45 78 70 20 24 0a 2a 20 40 70 61 63 6b 61 67 65 20 20 49 54 5b 58 5d 0a 2a 2f 0a 63 6c 61 73 | .Exp.$.*.@package..IT[X].*/.clas |
9dc0 | 73 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 58 20 65 78 74 65 6e 64 73 20 48 54 4d 4c | s.HTML_Template_ITX.extends.HTML |
9de0 | 5f 54 65 6d 70 6c 61 74 65 5f 49 54 20 7b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 41 72 | _Template_IT.{....../**.....*.Ar |
9e00 | 72 61 79 20 77 69 74 68 20 61 6c 6c 20 77 61 72 6e 69 6e 67 73 2e 0a 20 20 20 20 2a 20 40 76 61 | ray.with.all.warnings......*.@va |
9e20 | 72 20 20 20 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 | r.......array.....*.@access....p |
9e40 | 75 62 6c 69 63 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 20 24 70 72 69 6e 74 57 61 72 | ublic.....*.@see.......$printWar |
9e60 | 6e 69 6e 67 2c 20 24 68 61 6c 74 4f 6e 57 61 72 6e 69 6e 67 2c 20 77 61 72 6e 69 6e 67 28 29 0a | ning,.$haltOnWarning,.warning(). |
9e80 | 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 77 61 72 6e 20 3d 20 61 72 72 61 79 28 29 3b 0a | ....*/.....var.$warn.=.array();. |
9ea0 | 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 50 72 69 6e 74 20 77 61 72 6e 69 6e 67 73 3f 0a 20 | ...../**.....*.Print.warnings?.. |
9ec0 | 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 2a 20 40 61 63 63 | ...*.@var.......array.....*.@acc |
9ee0 | 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 24 68 | ess....public.....*.@see......$h |
9f00 | 61 6c 74 4f 6e 57 61 72 6e 69 6e 67 2c 20 24 77 61 72 6e 2c 20 77 61 72 6e 69 6e 67 28 29 0a 20 | altOnWarning,.$warn,.warning().. |
9f20 | 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 70 72 69 6e 74 57 61 72 6e 69 6e 67 20 3d 20 66 61 | ...*/.....var.$printWarning.=.fa |
9f40 | 6c 73 65 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 43 61 6c 6c 20 64 69 65 28 29 20 6f | lse;....../**.....*.Call.die().o |
9f60 | 6e 20 77 61 72 6e 69 6e 67 3f 0a 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 20 20 20 20 20 62 6f | n.warning?.....*.@var.........bo |
9f80 | 6f 6c 65 61 6e 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 | olean.....*.@access....public... |
9fa0 | 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 20 24 77 61 72 6e 2c 20 24 70 72 69 6e 74 57 61 72 6e | ..*.@see.......$warn,.$printWarn |
9fc0 | 69 6e 67 2c 20 77 61 72 6e 69 6e 67 28 29 0a 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 68 | ing,.warning().....*/.....var.$h |
9fe0 | 61 6c 74 4f 6e 57 61 72 6e 69 6e 67 20 3d 20 66 61 6c 73 65 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 | altOnWarning.=.false;....../**.. |
a000 | 20 20 20 2a 20 52 65 67 45 78 70 20 75 73 65 64 20 74 6f 20 74 65 73 74 20 66 6f 72 20 61 20 76 | ...*.RegExp.used.to.test.for.a.v |
a020 | 61 6c 69 64 20 62 6c 6f 63 6b 6e 61 6d 65 2e 0a 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 73 74 | alid.blockname......*.@var....st |
a040 | 72 69 6e 67 0a 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 63 68 65 63 6b 62 6c 6f 63 6b 6e | ring.....*/.....var.$checkblockn |
a060 | 61 6d 65 52 65 67 45 78 70 20 3d 20 27 27 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 46 | ameRegExp.=.'';....../**.....*.F |
a080 | 75 6e 63 74 69 6f 6e 6e 61 6d 65 70 72 65 66 69 78 20 75 73 65 64 20 77 68 65 6e 20 73 65 61 72 | unctionnameprefix.used.when.sear |
a0a0 | 63 68 69 6e 67 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 73 20 69 6e 20 74 68 65 20 74 65 6d 70 | ching.function.calls.in.the.temp |
a0c0 | 6c 61 74 65 2e 0a 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 2a | late......*.@var....string.....* |
a0e0 | 2f 0a 20 20 20 20 76 61 72 20 24 66 75 6e 63 74 69 6f 6e 50 72 65 66 69 78 20 3d 20 27 66 75 6e | /.....var.$functionPrefix.=.'fun |
a100 | 63 5f 27 3b 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 46 75 6e 63 74 69 6f 6e 6e 61 6d 65 | c_';....../**.....*.Functionname |
a120 | 20 52 65 67 45 78 70 2e 0a 20 20 20 20 2a 20 40 76 61 72 20 20 20 20 73 74 72 69 6e 67 0a 20 20 | .RegExp......*.@var....string... |
a140 | 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 66 75 6e 63 74 69 6f 6e 6e 61 6d 65 52 65 67 45 78 70 | ..*/.....var.$functionnameRegExp |
a160 | 20 3d 20 27 5b 5f 61 2d 7a 41 2d 5a 5d 2b 5b 41 2d 5a 61 2d 7a 5f 30 2d 39 5d 2a 27 3b 0a 0a 20 | .=.'[_a-zA-Z]+[A-Za-z_0-9]*';... |
a180 | 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 67 45 78 70 20 75 73 65 64 20 74 6f 20 67 72 65 70 | .../**.....*.RegExp.used.to.grep |
a1a0 | 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 73 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e | .function.calls.in.the.template. |
a1c0 | 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 54 68 65 20 76 61 72 69 61 62 6c 65 20 67 65 74 73 20 73 | .....*.....*.The.variable.gets.s |
a1e0 | 65 74 20 62 79 20 74 68 65 20 63 6f 6e 73 74 72 75 63 74 6f 72 2e 0a 20 20 20 20 2a 0a 20 20 20 | et.by.the.constructor......*.... |
a200 | 20 2a 20 40 76 61 72 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 | .*.@var....string.....*.@see.... |
a220 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 28 29 0a 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 | HTML_Template_IT().....*/.....va |
a240 | 72 20 24 66 75 6e 63 74 69 6f 6e 52 65 67 45 78 70 20 3d 20 27 27 3b 0a 0a 20 20 20 20 2f 2a 2a | r.$functionRegExp.=.'';....../** |
a260 | 0a 20 20 20 20 2a 20 4c 69 73 74 20 6f 66 20 66 75 6e 63 74 69 6f 6e 73 20 66 6f 75 6e 64 20 69 | .....*.List.of.functions.found.i |
a280 | 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 76 61 72 | n.the.template......*.....*.@var |
a2a0 | 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 20 24 66 75 6e 63 74 69 | ....array.....*/.....var.$functi |
a2c0 | 6f 6e 73 20 20 20 20 20 20 20 20 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 2f 2a 2a 0a | ons.........=.array();....../**. |
a2e0 | 20 20 20 20 2a 20 4c 69 73 74 20 6f 66 20 63 61 6c 6c 62 61 63 6b 20 66 75 6e 63 74 69 6f 6e 73 | ....*.List.of.callback.functions |
a300 | 20 73 70 65 63 69 66 69 65 64 20 62 79 20 74 68 65 20 75 73 65 72 2e 0a 20 20 20 20 2a 0a 20 20 | .specified.by.the.user......*... |
a320 | 20 20 2a 20 40 76 61 72 20 20 20 20 61 72 72 61 79 0a 20 20 20 20 2a 2f 0a 20 20 20 20 76 61 72 | ..*.@var....array.....*/.....var |
a340 | 20 24 63 61 6c 6c 62 61 63 6b 20 20 20 20 20 20 20 20 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 | .$callback.........=.array();... |
a360 | 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 42 75 69 6c 64 73 20 73 6f 6d 65 20 63 6f 6d 70 6c 65 78 | .../**.....*.Builds.some.complex |
a380 | 20 72 65 67 65 78 70 73 20 61 6e 64 20 63 61 6c 6c 73 20 74 68 65 20 63 6f 6e 73 74 72 75 63 74 | .regexps.and.calls.the.construct |
a3a0 | 6f 72 0a 20 20 20 20 2a 20 6f 66 20 74 68 65 20 70 61 72 65 6e 74 20 63 6c 61 73 73 2e 0a 20 20 | or.....*.of.the.parent.class.... |
a3c0 | 20 20 2a 0a 20 20 20 20 2a 20 4d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 79 6f 75 20 63 61 6c | ..*.....*.Make.sure.that.you.cal |
a3e0 | 6c 20 74 68 69 73 20 63 6f 6e 73 74 72 75 63 74 6f 72 20 69 66 20 79 6f 75 20 64 65 72 69 76 65 | l.this.constructor.if.you.derive |
a400 | 20 79 6f 75 72 20 6f 77 6e 0a 20 20 20 20 2a 20 74 65 6d 70 6c 61 74 65 20 63 6c 61 73 73 20 66 | .your.own.....*.template.class.f |
a420 | 72 6f 6d 20 74 68 69 73 20 6f 6e 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 73 65 65 20 20 | rom.this.one......*.....*.@see.. |
a440 | 20 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 28 29 0a 20 20 20 20 2a 2f 0a 20 20 20 20 | ..HTML_Template_IT().....*/..... |
a460 | 66 75 6e 63 74 69 6f 6e 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 58 28 24 72 6f 6f 74 | function.HTML_Template_ITX($root |
a480 | 20 3d 20 27 27 29 0a 20 20 20 20 7b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 68 65 | .=.'').....{..........$this->che |
a4a0 | 63 6b 62 6c 6f 63 6b 6e 61 6d 65 52 65 67 45 78 70 20 3d 20 27 40 27 20 2e 20 24 74 68 69 73 2d | ckblocknameRegExp.=.'@'...$this- |
a4c0 | 3e 62 6c 6f 63 6b 6e 61 6d 65 52 65 67 45 78 70 20 2e 20 27 40 27 3b 0a 20 20 20 20 20 20 20 20 | >blocknameRegExp...'@';......... |
a4e0 | 24 74 68 69 73 2d 3e 66 75 6e 63 74 69 6f 6e 52 65 67 45 78 70 20 3d 20 27 40 27 20 2e 20 24 74 | $this->functionRegExp.=.'@'...$t |
a500 | 68 69 73 2d 3e 66 75 6e 63 74 69 6f 6e 50 72 65 66 69 78 20 2e 20 27 28 27 20 2e 0a 20 20 20 20 | his->functionPrefix...'('....... |
a520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 | ............................$thi |
a540 | 73 2d 3e 66 75 6e 63 74 69 6f 6e 6e 61 6d 65 52 65 67 45 78 70 20 2e 20 27 29 5c 73 2a 5c 28 40 | s->functionnameRegExp...')\s*\(@ |
a560 | 73 6d 27 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 48 54 4d 4c 5f 54 65 6d 70 6c 61 | sm';..........$this->HTML_Templa |
a580 | 74 65 5f 49 54 28 24 72 6f 6f 74 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 | te_IT($root);.....}.//.end.func. |
a5a0 | 63 6f 6e 73 74 72 75 63 74 6f 72 0a 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 69 6e 69 74 28 29 | constructor......function.init() |
a5c0 | 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 72 65 65 28 29 3b 0a 20 20 | .....{.........$this->free();... |
a5e0 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 75 69 6c 64 46 75 6e 63 74 69 6f 6e 6c 69 73 74 28 29 | ......$this->buildFunctionlist() |
a600 | 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 69 6e 64 42 6c 6f 63 6b 73 28 24 74 68 69 | ;.........$this->findBlocks($thi |
a620 | 73 2d 3e 74 65 6d 70 6c 61 74 65 29 3b 0a 20 20 20 20 20 20 20 20 2f 2f 20 77 65 20 64 6f 6e 27 | s->template);.........//.we.don' |
a640 | 74 20 6e 65 65 64 20 69 74 20 61 6e 79 20 6d 6f 72 65 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 | t.need.it.any.more.........$this |
a660 | 2d 3e 74 65 6d 70 6c 61 74 65 20 3d 20 27 27 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | ->template.=.'';.........$this-> |
a680 | 62 75 69 6c 64 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 28 29 3b 0a 0a 20 20 20 20 7d | buildBlockvariablelist();......} |
a6a0 | 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 69 6e 69 74 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a | .//.end.func.init....../**.....* |
a6c0 | 20 52 65 70 6c 61 63 65 73 20 61 6e 20 65 78 69 73 74 69 6e 67 20 62 6c 6f 63 6b 20 77 69 74 68 | .Replaces.an.existing.block.with |
a6e0 | 20 6e 65 77 20 63 6f 6e 74 65 6e 74 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 54 68 69 73 20 66 | .new.content......*.....*.This.f |
a700 | 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 72 65 70 6c 61 63 65 20 61 20 62 6c 6f 63 6b 20 6f 66 20 | unction.will.replace.a.block.of. |
a720 | 74 68 65 20 74 65 6d 70 6c 61 74 65 20 61 6e 64 20 61 6c 6c 20 62 6c 6f 63 6b 73 0a 20 20 20 20 | the.template.and.all.blocks..... |
a740 | 2a 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 72 65 70 6c 61 63 65 64 20 62 6c 6f 63 | *.contained.in.the.replaced.bloc |
a760 | 6b 20 61 6e 64 20 61 64 64 20 61 20 6e 65 77 20 62 6c 6f 63 6b 20 69 6e 73 74 65 64 2c 20 6d 65 | k.and.add.a.new.block.insted,.me |
a780 | 61 6e 73 0a 20 20 20 20 2a 20 79 6f 75 20 63 61 6e 20 64 79 6e 61 6d 69 63 61 6c 6c 79 20 63 68 | ans.....*.you.can.dynamically.ch |
a7a0 | 61 6e 67 65 20 79 6f 75 72 20 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 | ange.your.template......*.....*. |
a7c0 | 4e 6f 74 65 20 74 68 61 74 20 63 68 61 6e 67 69 6e 67 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 | Note.that.changing.the.template. |
a7e0 | 73 74 72 75 63 74 75 72 65 20 76 69 6f 6c 61 74 65 73 20 6f 6e 65 20 6f 66 20 74 68 65 20 49 54 | structure.violates.one.of.the.IT |
a800 | 5b 58 5d 0a 20 20 20 20 2a 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 67 6f 61 6c 73 2e 20 49 27 76 | [X].....*.development.goals..I'v |
a820 | 65 20 74 72 69 65 64 20 74 6f 20 77 72 69 74 65 20 61 20 73 69 6d 70 6c 65 20 74 6f 20 75 73 65 | e.tried.to.write.a.simple.to.use |
a840 | 20 74 65 6d 70 6c 61 74 65 20 65 6e 67 69 6e 65 0a 20 20 20 20 2a 20 73 75 70 70 6f 72 74 69 6e | .template.engine.....*.supportin |
a860 | 67 20 62 6c 6f 63 6b 73 2e 20 49 6e 20 63 6f 6e 74 72 61 73 74 20 74 6f 20 6f 74 68 65 72 20 73 | g.blocks..In.contrast.to.other.s |
a880 | 79 73 74 65 6d 73 20 49 54 5b 58 5d 20 61 6e 61 6c 79 73 65 73 20 74 68 65 20 77 61 79 0a 20 20 | ystems.IT[X].analyses.the.way... |
a8a0 | 20 20 2a 20 79 6f 75 27 76 65 20 6e 65 73 74 65 64 20 62 6c 6f 63 6b 73 20 61 6e 64 20 6b 6e 6f | ..*.you've.nested.blocks.and.kno |
a8c0 | 77 73 20 77 68 69 63 68 20 62 6c 6f 63 6b 20 62 65 6c 6f 6e 67 73 20 69 6e 74 6f 20 61 6e 6f 74 | ws.which.block.belongs.into.anot |
a8e0 | 68 65 72 20 62 6c 6f 63 6b 2e 0a 20 20 20 20 2a 20 54 68 65 20 6e 65 73 74 69 6e 67 20 69 6e 66 | her.block......*.The.nesting.inf |
a900 | 6f 72 6d 61 74 69 6f 6e 20 68 65 6c 70 73 20 74 6f 20 6d 61 6b 65 20 74 68 65 20 41 50 49 20 73 | ormation.helps.to.make.the.API.s |
a920 | 68 6f 72 74 20 61 6e 64 20 73 69 6d 70 6c 65 2e 20 52 65 70 6c 61 63 69 6e 67 0a 20 20 20 20 2a | hort.and.simple..Replacing.....* |
a940 | 20 62 6c 6f 63 6b 73 20 64 6f 65 73 20 6e 6f 74 20 6f 6e 6c 79 20 6d 65 61 6e 20 74 68 61 74 20 | .blocks.does.not.only.mean.that. |
a960 | 49 54 5b 58 5d 20 68 61 73 20 74 6f 20 75 70 64 61 74 65 20 74 68 65 20 6e 65 73 74 69 6e 67 0a | IT[X].has.to.update.the.nesting. |
a980 | 20 20 20 20 2a 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 28 72 65 6c 61 74 69 76 65 6c 79 20 74 69 | ....*.information.(relatively.ti |
a9a0 | 6d 65 20 63 6f 6e 73 75 6d 70 74 69 6e 67 20 74 61 73 6b 29 20 62 75 74 20 79 6f 75 20 68 61 76 | me.consumpting.task).but.you.hav |
a9c0 | 65 20 74 6f 20 6d 61 6b 65 20 73 75 72 65 0a 20 20 20 20 2a 20 74 68 61 74 20 79 6f 75 20 64 6f | e.to.make.sure.....*.that.you.do |
a9e0 | 20 6e 6f 74 20 67 65 74 20 63 6f 6e 66 75 73 65 64 20 64 75 65 20 74 6f 20 74 68 65 20 74 65 6d | .not.get.confused.due.to.the.tem |
aa00 | 70 6c 61 74 65 20 63 68 61 6e 67 65 20 69 74 73 65 6c 66 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a | plate.change.itself......*.....* |
aa20 | 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 20 20 42 6c 6f 63 6b 6e 61 6d 65 | .@param....string......Blockname |
aa40 | 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 20 20 42 6c 6f | .....*.@param....string......Blo |
aa60 | 63 6b 63 6f 6e 74 65 6e 74 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 62 6f 6f 6c 65 61 | ckcontent.....*.@param....boolea |
aa80 | 6e 20 20 20 20 20 74 72 75 65 20 69 66 20 74 68 65 20 6e 65 77 20 62 6c 6f 63 6b 20 69 6e 68 65 | n.....true.if.the.new.block.inhe |
aaa0 | 72 69 74 73 20 74 68 65 20 63 6f 6e 74 65 6e 74 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 | rits.the.content.....*.......... |
aac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 66 20 74 68 65 20 6f 6c 64 20 62 6c 6f 63 6b 0a 20 20 | .............of.the.old.block... |
aae0 | 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 2a 20 40 74 68 72 | ..*.@return...boolean.....*.@thr |
ab00 | 6f 77 73 20 20 20 49 54 5f 45 72 72 6f 72 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 72 | ows...IT_Error.....*.@see......r |
ab20 | 65 70 6c 61 63 65 42 6c 6f 63 6b 66 69 6c 65 28 29 2c 20 61 64 64 42 6c 6f 63 6b 28 29 2c 20 61 | eplaceBlockfile(),.addBlock(),.a |
ab40 | 64 64 42 6c 6f 63 6b 66 69 6c 65 28 29 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 | ddBlockfile().....*.@access...pu |
ab60 | 62 6c 69 63 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 72 65 70 6c 61 63 65 | blic.....*/.....function.replace |
ab80 | 42 6c 6f 63 6b 28 24 62 6c 6f 63 6b 2c 20 24 74 65 6d 70 6c 61 74 65 2c 20 24 6b 65 65 70 5f 63 | Block($block,.$template,.$keep_c |
aba0 | 6f 6e 74 65 6e 74 20 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 66 | ontent.=.false).....{.........if |
abc0 | 20 28 21 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b | .(!isset($this->blocklist[$block |
abe0 | 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 49 54 5f | ])).{.............return.new.IT_ |
ac00 | 45 72 72 6f 72 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 22 54 68 65 20 62 6c 6f 63 6b 20 22 2e | Error(............."The.block.". |
ac20 | 22 27 24 62 6c 6f 63 6b 27 22 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 22 20 64 6f 65 73 20 6e | "'$block'"..............".does.n |
ac40 | 6f 74 20 65 78 69 73 74 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 61 6e 64 20 74 68 75 | ot.exist.in.the.template.and.thu |
ac60 | 73 20 69 74 20 63 61 6e 27 74 20 62 65 20 72 65 70 6c 61 63 65 64 2e 22 2c 0a 20 20 20 20 20 20 | s.it.can't.be.replaced.",....... |
ac80 | 20 20 20 20 20 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 0a 20 20 20 20 20 20 20 | ......__FILE__,.__LINE__........ |
aca0 | 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 69 66 20 28 27 27 | .....);.........}.........if.('' |
acc0 | 20 3d 3d 20 24 74 65 6d 70 6c 61 74 65 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 | .==.$template).{.............ret |
ace0 | 75 72 6e 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 27 4e 6f 20 62 6c 6f 63 6b 20 63 6f 6e 74 65 | urn.new.IT_Error('No.block.conte |
ad00 | 6e 74 20 67 69 76 65 6e 2e 27 2c 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 29 3b | nt.given.',.__FILE__,.__LINE__); |
ad20 | 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 69 66 20 28 24 6b 65 65 70 5f 63 6f 6e | .........}.........if.($keep_con |
ad40 | 74 65 6e 74 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 62 6c 6f 63 6b 64 61 74 61 20 3d | tent).{.............$blockdata.= |
ad60 | 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 62 6c 6f 63 6b 5d 3b 0a 20 20 20 20 20 | .$this->blockdata[$block];...... |
ad80 | 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 72 65 6d 6f 76 65 20 61 6c 6c 20 6b 69 6e 64 | ...}..........//.remove.all.kind |
ada0 | 73 20 6f 66 20 6c 69 6e 6b 73 20 74 6f 20 74 68 65 20 62 6c 6f 63 6b 20 2f 20 64 61 74 61 20 6f | s.of.links.to.the.block./.data.o |
adc0 | 66 20 74 68 65 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 | f.the.block.........$this->remov |
ade0 | 65 42 6c 6f 63 6b 44 61 74 61 28 24 62 6c 6f 63 6b 29 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 65 | eBlockData($block);..........$te |
ae00 | 6d 70 6c 61 74 65 20 3d 20 22 3c 21 2d 2d 20 42 45 47 49 4e 20 24 62 6c 6f 63 6b 20 2d 2d 3e 22 | mplate.=."<!--.BEGIN.$block.-->" |
ae20 | 20 2e 20 24 74 65 6d 70 6c 61 74 65 20 2e 20 22 3c 21 2d 2d 20 45 4e 44 20 24 62 6c 6f 63 6b 20 | ...$template..."<!--.END.$block. |
ae40 | 2d 2d 3e 22 3b 0a 20 20 20 20 20 20 20 20 24 70 61 72 65 6e 74 73 20 3d 20 24 74 68 69 73 2d 3e | -->";.........$parents.=.$this-> |
ae60 | 62 6c 6f 63 6b 70 61 72 65 6e 74 73 5b 24 62 6c 6f 63 6b 5d 3b 0a 20 20 20 20 20 20 20 20 24 74 | blockparents[$block];.........$t |
ae80 | 68 69 73 2d 3e 66 69 6e 64 42 6c 6f 63 6b 73 28 24 74 65 6d 70 6c 61 74 65 29 3b 0a 20 20 20 20 | his->findBlocks($template);..... |
aea0 | 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 70 61 72 65 6e 74 73 5b 24 62 6c 6f 63 6b 5d 20 | ....$this->blockparents[$block]. |
aec0 | 3d 20 24 70 61 72 65 6e 74 73 3b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 4b 4c 55 44 47 45 3a 20 | =.$parents;..........//.KLUDGE:. |
aee0 | 72 65 62 75 69 6c 64 20 74 68 65 20 6c 69 73 74 20 66 6f 72 20 61 6c 6c 20 62 6c 6f 63 6b 20 2d | rebuild.the.list.for.all.block.- |
af00 | 20 63 6f 75 6c 64 20 62 65 20 64 6f 6e 65 20 66 61 73 74 65 72 0a 20 20 20 20 20 20 20 20 24 74 | .could.be.done.faster.........$t |
af20 | 68 69 73 2d 3e 62 75 69 6c 64 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 28 29 3b 0a 0a | his->buildBlockvariablelist();.. |
af40 | 20 20 20 20 20 20 20 20 69 66 20 28 24 6b 65 65 70 5f 63 6f 6e 74 65 6e 74 29 20 7b 0a 20 20 20 | ........if.($keep_content).{.... |
af60 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b 24 62 6c 6f 63 6b | .........$this->blockdata[$block |
af80 | 5d 20 3d 20 24 62 6c 6f 63 6b 64 61 74 61 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 | ].=.$blockdata;.........}....... |
afa0 | 20 20 20 2f 2f 20 6f 6c 64 20 54 4f 44 4f 20 2d 20 49 27 6d 20 6e 6f 74 20 73 75 72 65 20 69 66 | ...//.old.TODO.-.I'm.not.sure.if |
afc0 | 20 77 65 20 6e 65 65 64 20 74 68 69 73 0a 20 20 20 20 20 20 20 20 2f 2f 20 75 70 64 61 74 65 20 | .we.need.this.........//.update. |
afe0 | 63 61 63 68 65 73 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a 20 20 20 | caches..........return.true;.... |
b000 | 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 72 65 70 6c 61 63 65 42 6c 6f 63 6b 0a 0a 20 20 20 | .}.//.end.func.replaceBlock..... |
b020 | 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 70 6c 61 63 65 73 20 61 6e 20 65 78 69 73 74 69 6e 67 20 | ./**.....*.Replaces.an.existing. |
b040 | 62 6c 6f 63 6b 20 77 69 74 68 20 6e 65 77 20 63 6f 6e 74 65 6e 74 20 66 72 6f 6d 20 61 20 66 69 | block.with.new.content.from.a.fi |
b060 | 6c 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 62 72 6f 74 68 65 72 20 72 65 70 6c 61 63 65 | le......*.....*.@brother.replace |
b080 | 42 6c 6f 63 6b 28 29 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 | Block().....*.@param....string.. |
b0a0 | 20 20 42 6c 6f 63 6b 6e 61 6d 65 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 | ..Blockname.....*.@param....stri |
b0c0 | 6e 67 20 20 20 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 74 68 61 74 20 63 6f 6e 74 | ng....Name.of.the.file.that.cont |
b0e0 | 61 69 6e 73 20 74 68 65 20 62 6c 6f 63 6b 63 6f 6e 74 65 6e 74 0a 20 20 20 20 2a 20 40 70 61 72 | ains.the.blockcontent.....*.@par |
b100 | 61 6d 20 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 74 72 75 65 20 69 66 20 74 68 65 20 6e 65 77 20 | am....boolean...true.if.the.new. |
b120 | 62 6c 6f 63 6b 20 69 6e 68 65 72 69 74 73 20 74 68 65 20 63 6f 6e 74 65 6e 74 20 6f 66 20 74 68 | block.inherits.the.content.of.th |
b140 | 65 20 6f 6c 64 20 62 6c 6f 63 6b 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 | e.old.block.....*/.....function. |
b160 | 72 65 70 6c 61 63 65 42 6c 6f 63 6b 66 69 6c 65 28 24 62 6c 6f 63 6b 2c 20 24 66 69 6c 65 6e 61 | replaceBlockfile($block,.$filena |
b180 | 6d 65 2c 20 24 6b 65 65 70 5f 63 6f 6e 74 65 6e 74 20 3d 20 66 61 6c 73 65 29 0a 20 20 20 20 7b | me,.$keep_content.=.false).....{ |
b1a0 | 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 72 65 70 6c 61 63 65 42 6c | .........return.$this->replaceBl |
b1c0 | 6f 63 6b 28 24 62 6c 6f 63 6b 2c 20 24 74 68 69 73 2d 3e 67 65 74 46 69 6c 65 28 24 66 69 6c 65 | ock($block,.$this->getFile($file |
b1e0 | 6e 61 6d 65 29 2c 20 24 6b 65 65 70 5f 63 6f 6e 74 65 6e 74 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 | name),.$keep_content);.....}.//. |
b200 | 65 6e 64 20 66 75 6e 63 20 72 65 70 6c 61 63 65 42 6c 6f 63 6b 66 69 6c 65 0a 0a 20 20 20 20 2f | end.func.replaceBlockfile....../ |
b220 | 2a 2a 0a 20 20 20 20 2a 20 41 64 64 73 20 61 20 62 6c 6f 63 6b 20 74 6f 20 74 68 65 20 74 65 6d | **.....*.Adds.a.block.to.the.tem |
b240 | 70 6c 61 74 65 20 63 68 61 6e 67 69 6e 67 20 61 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 | plate.changing.a.variable.placeh |
b260 | 6f 6c 64 65 72 0a 20 20 20 20 2a 20 74 6f 20 61 20 62 6c 6f 63 6b 20 70 6c 61 63 65 68 6f 6c 64 | older.....*.to.a.block.placehold |
b280 | 65 72 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 41 64 64 20 6d 65 61 6e 73 20 22 72 65 70 6c 61 | er......*.....*.Add.means."repla |
b2a0 | 63 65 20 61 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 62 79 20 61 20 6e | ce.a.variable.placeholder.by.a.n |
b2c0 | 65 77 20 62 6c 6f 63 6b 22 2e 0a 20 20 20 20 2a 20 54 68 69 73 20 69 73 20 64 69 66 66 65 72 65 | ew.block"......*.This.is.differe |
b2e0 | 6e 74 20 74 6f 20 50 48 50 4c 69 62 73 20 74 65 6d 70 6c 61 74 65 73 2e 20 54 68 65 20 66 75 6e | nt.to.PHPLibs.templates..The.fun |
b300 | 63 74 69 6f 6e 20 6c 6f 61 64 73 20 61 0a 20 20 20 20 2a 20 62 6c 6f 63 6b 2c 20 63 72 65 61 74 | ction.loads.a.....*.block,.creat |
b320 | 65 73 20 61 20 68 61 6e 64 6c 65 20 66 6f 72 20 69 74 20 61 6e 64 20 61 73 73 69 67 6e 73 20 69 | es.a.handle.for.it.and.assigns.i |
b340 | 74 20 74 6f 20 61 20 63 65 72 74 61 69 6e 0a 20 20 20 20 2a 20 76 61 72 69 61 62 6c 65 20 70 6c | t.to.a.certain.....*.variable.pl |
b360 | 61 63 65 68 6f 6c 64 65 72 2e 20 54 6f 20 74 6f 20 74 68 65 20 73 61 6d 65 20 77 69 74 68 20 50 | aceholder..To.to.the.same.with.P |
b380 | 48 50 4c 69 62 73 20 74 65 6d 70 6c 61 74 65 73 20 79 6f 75 20 77 6f 75 6c 64 0a 20 20 20 20 2a | HPLibs.templates.you.would.....* |
b3a0 | 20 63 61 6c 6c 20 73 65 74 5f 66 69 6c 65 28 29 20 74 6f 20 63 72 65 61 74 65 20 74 68 65 20 68 | .call.set_file().to.create.the.h |
b3c0 | 61 6e 64 6c 65 20 61 6e 64 20 70 61 72 73 65 28 29 20 74 6f 20 61 73 73 69 67 6e 20 74 68 65 0a | andle.and.parse().to.assign.the. |
b3e0 | 20 20 20 20 2a 20 70 61 72 73 65 64 20 62 6c 6f 63 6b 20 74 6f 20 61 20 76 61 72 69 61 62 6c 65 | ....*.parsed.block.to.a.variable |
b400 | 2e 20 42 79 20 74 68 69 73 20 50 48 50 4c 69 62 73 20 74 65 6d 70 6c 61 74 65 73 20 61 73 73 75 | ..By.this.PHPLibs.templates.assu |
b420 | 6d 65 0a 20 20 20 20 2a 20 74 68 61 74 20 79 6f 75 20 74 65 6e 64 20 74 6f 20 61 73 73 69 67 6e | me.....*.that.you.tend.to.assign |
b440 | 20 61 20 62 6c 6f 63 6b 20 74 6f 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 20 6f 6e 65 20 70 6c | .a.block.to.more.than.one.one.pl |
b460 | 61 63 65 68 6f 6c 64 65 72 2e 0a 20 20 20 20 2a 20 54 6f 20 61 73 73 69 67 6e 20 61 20 70 61 72 | aceholder......*.To.assign.a.par |
b480 | 73 65 64 20 62 6c 6f 63 6b 20 74 6f 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 6c 79 20 74 68 65 20 | sed.block.to.more.than.only.the. |
b4a0 | 70 6c 61 63 65 68 6f 6c 64 65 72 20 79 6f 75 20 73 70 65 63 69 66 79 0a 20 20 20 20 2a 20 69 6e | placeholder.you.specify.....*.in |
b4c0 | 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 79 6f 75 20 68 61 76 65 20 74 6f 20 75 73 65 20 61 | .this.function.you.have.to.use.a |
b4e0 | 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 6f 66 20 67 65 74 42 6c 6f 63 6b 28 29 0a 20 20 20 20 2a | .combination.of.getBlock().....* |
b500 | 20 61 6e 64 20 73 65 74 56 61 72 69 61 62 6c 65 28 29 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 | .and.setVariable()......*.....*. |
b520 | 41 73 20 6e 6f 20 75 70 64 61 74 65 73 20 74 6f 20 63 61 63 68 65 64 20 64 61 74 61 20 69 73 20 | As.no.updates.to.cached.data.is. |
b540 | 6e 65 63 65 73 73 61 72 79 20 61 64 64 42 6c 6f 63 6b 28 29 20 61 6e 64 20 61 64 64 42 6c 6f 63 | necessary.addBlock().and.addBloc |
b560 | 6b 66 69 6c 65 28 29 0a 20 20 20 20 2a 20 61 72 65 20 72 61 74 68 65 72 20 22 63 68 65 61 70 22 | kfile().....*.are.rather."cheap" |
b580 | 20 6d 65 61 6e 69 6e 67 20 71 75 69 63 6b 20 6f 70 65 72 61 74 69 6f 6e 73 2e 0a 20 20 20 20 2a | .meaning.quick.operations......* |
b5a0 | 0a 20 20 20 20 2a 20 54 68 65 20 62 6c 6f 63 6b 20 63 6f 6e 74 65 6e 74 20 6d 75 73 74 20 6e 6f | .....*.The.block.content.must.no |
b5c0 | 74 20 73 74 61 72 74 20 77 69 74 68 20 3c 21 2d 2d 20 42 45 47 49 4e 20 62 6c 6f 63 6b 6e 61 6d | t.start.with.<!--.BEGIN.blocknam |
b5e0 | 65 20 2d 2d 3e 0a 20 20 20 20 2a 20 61 6e 64 20 65 6e 64 20 77 69 74 68 20 3c 21 2d 2d 20 45 4e | e.-->.....*.and.end.with.<!--.EN |
b600 | 44 20 62 6c 6f 63 6b 6e 61 6d 65 20 2d 2d 3e 20 74 68 69 73 20 77 6f 75 6c 64 20 63 61 75 73 65 | D.blockname.-->.this.would.cause |
b620 | 20 6f 76 65 72 68 65 61 64 20 61 6e 64 0a 20 20 20 20 2a 20 70 72 6f 64 75 63 65 20 61 6e 20 65 | .overhead.and.....*.produce.an.e |
b640 | 72 72 6f 72 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 | rror......*.....*.@param....stri |
b660 | 6e 67 20 20 20 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 | ng....Name.of.the.variable.place |
b680 | 68 6f 6c 64 65 72 2c 20 74 68 65 20 6e 61 6d 65 20 6d 75 73 74 20 62 65 20 75 6e 69 71 75 65 0a | holder,.the.name.must.be.unique. |
b6a0 | 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 69 74 68 69 6e | ....*.....................within |
b6c0 | 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 | .the.template......*.@param....s |
b6e0 | 74 72 69 6e 67 20 20 20 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 20 74 6f 20 62 65 | tring....Name.of.the.block.to.be |
b700 | 20 61 64 64 65 64 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 | .added.....*.@param....string... |
b720 | 20 43 6f 6e 74 65 6e 74 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 0a 20 20 20 20 2a 20 40 72 65 74 | .Content.of.the.block.....*.@ret |
b740 | 75 72 6e 20 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 2a 20 40 74 68 72 6f 77 73 20 20 20 49 54 | urn...boolean.....*.@throws...IT |
b760 | 5f 45 72 72 6f 72 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 61 64 64 42 6c 6f 63 6b 66 | _Error.....*.@see......addBlockf |
b780 | 69 6c 65 28 29 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 | ile().....*.@access...public.... |
b7a0 | 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 42 6c 6f 63 6b 28 24 70 6c 61 63 65 | .*/.....function.addBlock($place |
b7c0 | 68 6f 6c 64 65 72 2c 20 24 62 6c 6f 63 6b 6e 61 6d 65 2c 20 24 74 65 6d 70 6c 61 74 65 29 0a 20 | holder,.$blockname,.$template).. |
b7e0 | 20 20 20 7b 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 44 6f 6e 27 74 20 74 72 75 73 74 20 61 6e 79 | ...{..........//.Don't.trust.any |
b800 | 20 75 73 65 72 20 65 76 65 6e 20 69 66 20 69 74 27 73 20 61 20 70 72 6f 67 72 61 6d 6d 65 72 20 | .user.even.if.it's.a.programmer. |
b820 | 6f 72 20 79 6f 75 72 73 65 6c 66 2e 2e 2e 0a 20 20 20 20 20 20 20 20 69 66 20 28 27 27 20 3d 3d | or.yourself............if.(''.== |
b840 | 20 24 70 6c 61 63 65 68 6f 6c 64 65 72 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 | .$placeholder).{..............re |
b860 | 74 75 72 6e 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 27 4e 6f 20 76 61 72 69 61 62 6c 65 20 70 | turn.new.IT_Error('No.variable.p |
b880 | 6c 61 63 65 68 6f 6c 64 65 72 20 67 69 76 65 6e 2e 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | laceholder.given.',............. |
b8a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f | ....................__FILE__,.__ |
b8c0 | 4c 49 4e 45 5f 5f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | LINE__.......................... |
b8e0 | 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 69 66 20 28 20 27 | .......);..........}.else.if.(.' |
b900 | 27 20 3d 3d 20 24 62 6c 6f 63 6b 6e 61 6d 65 20 7c 7c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | '.==.$blockname.||.............. |
b920 | 20 20 20 20 20 20 20 21 70 72 65 67 5f 6d 61 74 63 68 28 24 74 68 69 73 2d 3e 63 68 65 63 6b 62 | .......!preg_match($this->checkb |
b940 | 6c 6f 63 6b 6e 61 6d 65 52 65 67 45 78 70 2c 20 24 62 6c 6f 63 6b 6e 61 6d 65 29 0a 20 20 20 20 | locknameRegExp,.$blockname)..... |
b960 | 20 20 20 20 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 | ....).{..............return.new. |
b980 | 49 54 5f 45 72 72 6f 72 28 22 4e 6f 20 6f 72 20 69 6e 76 61 6c 69 64 20 62 6c 6f 63 6b 6e 61 6d | IT_Error("No.or.invalid.blocknam |
b9a0 | 65 20 27 24 62 6c 6f 63 6b 6e 61 6d 65 27 20 67 69 76 65 6e 2e 22 2c 0a 20 20 20 20 20 20 20 20 | e.'$blockname'.given.",......... |
b9c0 | 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 0a 20 | ............__FILE__,.__LINE__.. |
b9e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 7d | ...................);..........} |
ba00 | 20 65 6c 73 65 20 69 66 20 28 27 27 20 3d 3d 20 24 74 65 6d 70 6c 61 74 65 29 20 7b 0a 0a 20 20 | .else.if.(''.==.$template).{.... |
ba20 | 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 27 4e | ..........return.new.IT_Error('N |
ba40 | 6f 20 62 6c 6f 63 6b 20 63 6f 6e 74 65 6e 74 20 67 69 76 65 6e 2e 27 2c 20 5f 5f 46 49 4c 45 5f | o.block.content.given.',.__FILE_ |
ba60 | 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 29 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 69 66 | _,.__LINE__);..........}.else.if |
ba80 | 20 28 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 6e | .(isset($this->blocklist[$blockn |
baa0 | 61 6d 65 5d 29 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 | ame])).{..............return.new |
bac0 | 20 49 54 5f 45 72 72 6f 72 28 27 54 68 65 20 62 6c 6f 63 6b 20 61 6c 72 65 61 64 79 20 65 78 69 | .IT_Error('The.block.already.exi |
bae0 | 73 74 73 2e 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | sts.',.......................... |
bb00 | 20 20 20 20 20 20 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 0a 20 20 20 20 20 20 | .......__FILE__,.__LINE__....... |
bb20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 | ......................);........ |
bb40 | 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 66 69 6e 64 20 6f 75 74 20 77 68 65 72 65 20 74 | ..}..........//.find.out.where.t |
bb60 | 6f 20 69 6e 73 65 72 74 20 74 68 65 20 6e 65 77 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 24 | o.insert.the.new.block.........$ |
bb80 | 70 61 72 65 6e 74 73 20 3d 20 24 74 68 69 73 2d 3e 66 69 6e 64 50 6c 61 63 65 68 6f 6c 64 65 72 | parents.=.$this->findPlaceholder |
bba0 | 42 6c 6f 63 6b 73 28 24 70 6c 61 63 65 68 6f 6c 64 65 72 29 3b 0a 20 20 20 20 20 20 20 20 69 66 | Blocks($placeholder);.........if |
bbc0 | 20 28 30 20 3d 3d 20 63 6f 75 6e 74 28 24 70 61 72 65 6e 74 73 29 29 20 7b 0a 0a 20 20 20 20 20 | .(0.==.count($parents)).{....... |
bbe0 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 0a 20 20 20 20 | .......return.new.IT_Error(..... |
bc00 | 20 20 20 20 20 20 20 20 20 20 20 20 22 54 68 65 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 | ............"The.variable.placeh |
bc20 | 6f 6c 64 65 72 22 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 20 27 24 70 6c 61 63 | older"..................".'$plac |
bc40 | 65 68 6f 6c 64 65 72 27 20 77 61 73 20 6e 6f 74 20 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 74 65 | eholder'.was.not.found.in.the.te |
bc60 | 6d 70 6c 61 74 65 2e 22 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f 46 49 4c 45 | mplate.",.................__FILE |
bc80 | 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 0a 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 | __,.__LINE__.............);..... |
bca0 | 20 20 20 20 20 7d 20 65 6c 73 65 20 69 66 20 28 20 63 6f 75 6e 74 28 24 70 61 72 65 6e 74 73 29 | .....}.else.if.(.count($parents) |
bcc0 | 20 3e 20 31 20 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 65 74 28 24 70 61 72 | .>.1.).{..............reset($par |
bce0 | 65 6e 74 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 69 73 74 28 24 | ents);.............while.(list($ |
bd00 | 6b 2c 20 24 70 61 72 65 6e 74 29 20 3d 20 65 61 63 68 28 24 70 61 72 65 6e 74 73 29 29 20 7b 0a | k,.$parent).=.each($parents)).{. |
bd20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 6d 73 67 20 2e 3d 20 22 24 70 61 72 65 6e 74 | ................$msg..=."$parent |
bd40 | 2c 20 22 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 | ,.";.............}.............$ |
bd60 | 6d 73 67 20 3d 20 73 75 62 73 74 72 28 24 70 61 72 65 6e 74 2c 20 2d 32 29 3b 0a 0a 20 20 20 20 | msg.=.substr($parent,.-2);...... |
bd80 | 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 22 54 68 65 | ........return.new.IT_Error("The |
bda0 | 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 22 2e 22 27 24 70 6c 61 63 65 | .variable.placeholder."."'$place |
bdc0 | 68 6f 6c 64 65 72 27 22 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | holder'"........................ |
bde0 | 20 20 20 20 20 20 20 20 20 20 22 20 6d 75 73 74 20 62 65 20 75 6e 69 71 75 65 2c 20 66 6f 75 6e | ..........".must.be.unique,.foun |
be00 | 64 20 69 6e 20 6d 75 6c 74 69 70 6c 65 20 62 6c 6f 63 6b 73 20 27 24 6d 73 67 27 2e 22 2c 0a 20 | d.in.multiple.blocks.'$msg'.",.. |
be20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f | ..............................._ |
be40 | 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | _FILE__,.__LINE__............... |
be60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a | ..................);.........}.. |
be80 | 20 20 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 20 3d 20 22 3c 21 2d 2d 20 42 45 47 49 4e 20 | ........$template.=."<!--.BEGIN. |
bea0 | 24 62 6c 6f 63 6b 6e 61 6d 65 20 2d 2d 3e 22 20 2e 20 24 74 65 6d 70 6c 61 74 65 20 2e 20 22 3c | $blockname.-->"...$template..."< |
bec0 | 21 2d 2d 20 45 4e 44 20 24 62 6c 6f 63 6b 6e 61 6d 65 20 2d 2d 3e 22 3b 0a 20 20 20 20 20 20 20 | !--.END.$blockname.-->";........ |
bee0 | 20 24 74 68 69 73 2d 3e 66 69 6e 64 42 6c 6f 63 6b 73 28 24 74 65 6d 70 6c 61 74 65 29 3b 0a 20 | .$this->findBlocks($template);.. |
bf00 | 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 66 6c 61 67 42 6c 6f 63 6b 74 72 6f 75 62 | .......if.($this->flagBlocktroub |
bf20 | 6c 65 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 20 | le).{.............return.false;. |
bf40 | 20 20 20 2f 2f 20 66 69 6e 64 42 6c 6f 63 6b 73 28 29 20 61 6c 72 65 61 64 79 20 74 68 72 6f 77 | ...//.findBlocks().already.throw |
bf60 | 73 20 61 6e 20 65 78 63 65 70 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 | s.an.exception.........}........ |
bf80 | 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 70 61 72 65 6e 74 73 5b 30 5d 5d 5b | .$this->blockinner[$parents[0]][ |
bfa0 | 5d 20 3d 20 24 62 6c 6f 63 6b 6e 61 6d 65 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 | ].=.$blockname;.........$this->b |
bfc0 | 6c 6f 63 6b 6c 69 73 74 5b 24 70 61 72 65 6e 74 73 5b 30 5d 5d 20 3d 20 70 72 65 67 5f 72 65 70 | locklist[$parents[0]].=.preg_rep |
bfe0 | 6c 61 63 65 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 40 27 20 2e 20 | lace(.....................'@'... |
c000 | 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 20 24 70 6c 61 63 65 | $this->openingDelimiter...$place |
c020 | 68 6f 6c 64 65 72 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 | holder.......................$th |
c040 | 69 73 2d 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 20 2e 20 27 40 27 2c 0a 0a 20 20 20 | is->closingDelimiter...'@',..... |
c060 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 6f 70 65 6e 69 6e 67 44 | .................$this->openingD |
c080 | 65 6c 69 6d 69 74 65 72 20 2e 20 27 5f 5f 27 20 2e 20 24 62 6c 6f 63 6b 6e 61 6d 65 20 2e 20 27 | elimiter...'__'...$blockname...' |
c0a0 | 5f 5f 27 20 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | __'.......................$this- |
c0c0 | 3e 63 6c 6f 73 69 6e 67 44 65 6c 69 6d 69 74 65 72 2c 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 | >closingDelimiter,.............. |
c0e0 | 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 70 61 72 65 6e 74 | ........$this->blocklist[$parent |
c100 | 73 5b 30 5d 5d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 | s[0]].................);........ |
c120 | 20 20 24 74 68 69 73 2d 3e 64 65 6c 65 74 65 46 72 6f 6d 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 | ..$this->deleteFromBlockvariable |
c140 | 6c 69 73 74 28 24 70 61 72 65 6e 74 73 5b 30 5d 2c 20 24 70 6c 61 63 65 68 6f 6c 64 65 72 29 3b | list($parents[0],.$placeholder); |
c160 | 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 42 6c 6f 63 6b 76 61 72 69 61 | .........$this->updateBlockvaria |
c180 | 62 6c 65 6c 69 73 74 28 24 62 6c 6f 63 6b 6e 61 6d 65 29 3b 0a 20 20 20 20 2f 2a 0a 20 20 20 20 | blelist($blockname);...../*..... |
c1a0 | 2f 2f 20 63 68 65 63 6b 20 69 66 20 61 6e 79 20 69 6e 6e 65 72 20 62 6c 6f 63 6b 73 20 77 65 72 | //.check.if.any.inner.blocks.wer |
c1c0 | 65 20 66 6f 75 6e 64 0a 20 20 20 20 69 66 28 69 73 5f 61 72 72 61 79 28 24 74 68 69 73 2d 3e 62 | e.found.....if(is_array($this->b |
c1e0 | 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 6e 61 6d 65 5d 29 20 61 6e 64 20 63 6f 75 6e 74 | lockinner[$blockname]).and.count |
c200 | 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 6e 61 6d 65 5d 29 20 | ($this->blockinner[$blockname]). |
c220 | 3e 20 30 29 20 7b 0a 20 20 20 20 20 20 20 20 2f 2f 20 6c 6f 6f 70 20 74 68 72 6f 75 67 68 20 69 | >.0).{.........//.loop.through.i |
c240 | 6e 6e 65 72 20 62 6c 6f 63 6b 73 2c 20 72 65 67 69 73 74 65 72 69 6e 67 20 74 68 65 20 76 61 72 | nner.blocks,.registering.the.var |
c260 | 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 73 20 69 6e 20 65 61 63 68 0a 20 20 20 20 20 | iable.placeholders.in.each...... |
c280 | 20 20 20 66 6f 72 65 61 63 68 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c | ...foreach($this->blockinner[$bl |
c2a0 | 6f 63 6b 6e 61 6d 65 5d 20 61 73 20 24 63 68 69 6c 64 42 6c 6f 63 6b 29 20 7b 0a 20 20 20 20 20 | ockname].as.$childBlock).{...... |
c2c0 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 42 6c 6f 63 6b 76 61 72 69 61 62 6c | .......$this->updateBlockvariabl |
c2e0 | 65 6c 69 73 74 28 24 63 68 69 6c 64 42 6c 6f 63 6b 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 | elist($childBlock);.........}... |
c300 | 20 20 7d 0a 20 20 20 20 2a 2f 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0a | ..}.....*/.........return.true;. |
c320 | 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 61 64 64 42 6c 6f 63 6b 0a 0a 20 20 20 20 | ....}.//.end.func.addBlock...... |
c340 | 2f 2a 2a 0a 20 20 20 20 2a 20 41 64 64 73 20 61 20 62 6c 6f 63 6b 20 74 61 6b 65 6e 20 66 72 6f | /**.....*.Adds.a.block.taken.fro |
c360 | 6d 20 61 20 66 69 6c 65 20 74 6f 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 68 61 6e 67 69 6e | m.a.file.to.the.template.changin |
c380 | 67 20 61 20 76 61 72 69 61 62 6c 65 0a 20 20 20 20 2a 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 74 | g.a.variable.....*.placeholder.t |
c3a0 | 6f 20 61 20 62 6c 6f 63 6b 20 70 6c 61 63 65 68 6f 6c 64 65 72 2e 0a 20 20 20 20 2a 0a 20 20 20 | o.a.block.placeholder......*.... |
c3c0 | 20 2a 20 40 70 61 72 61 6d 20 20 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 4e 61 6d 65 20 6f 66 | .*.@param......string....Name.of |
c3e0 | 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 74 6f 20 62 65 20 | .the.variable.placeholder.to.be. |
c400 | 63 6f 6e 76 65 72 74 65 64 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 20 20 73 74 72 69 | converted.....*.@param......stri |
c420 | 6e 67 20 20 20 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 20 74 6f 20 62 65 20 61 64 | ng....Name.of.the.block.to.be.ad |
c440 | 64 65 64 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 | ded.....*.@param......string.... |
c460 | 46 69 6c 65 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 62 6c 6f 63 6b 0a 20 20 20 | File.that.contains.the.block.... |
c480 | 20 2a 20 40 62 72 6f 74 68 65 72 20 20 20 20 61 64 64 42 6c 6f 63 6b 28 29 0a 20 20 20 20 2a 2f | .*.@brother....addBlock().....*/ |
c4a0 | 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 42 6c 6f 63 6b 66 69 6c 65 28 24 70 6c 61 63 | .....function.addBlockfile($plac |
c4c0 | 65 68 6f 6c 64 65 72 2c 20 24 62 6c 6f 63 6b 6e 61 6d 65 2c 20 24 66 69 6c 65 6e 61 6d 65 29 0a | eholder,.$blockname,.$filename). |
c4e0 | 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 61 64 64 42 | ....{.........return.$this->addB |
c500 | 6c 6f 63 6b 28 24 70 6c 61 63 65 68 6f 6c 64 65 72 2c 20 24 62 6c 6f 63 6b 6e 61 6d 65 2c 20 24 | lock($placeholder,.$blockname,.$ |
c520 | 74 68 69 73 2d 3e 67 65 74 46 69 6c 65 28 24 66 69 6c 65 6e 61 6d 65 29 29 3b 0a 20 20 20 20 7d | this->getFile($filename));.....} |
c540 | 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 61 64 64 42 6c 6f 63 6b 66 69 6c 65 0a 0a 20 20 20 20 2f | .//.end.func.addBlockfile....../ |
c560 | 2a 2a 0a 20 20 20 20 2a 20 52 65 74 75 72 6e 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20 74 68 65 | **.....*.Returns.the.name.of.the |
c580 | 20 28 66 69 72 73 74 29 20 62 6c 6f 63 6b 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 0a 20 20 20 | .(first).block.that.contains.... |
c5a0 | 20 2a 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 70 6c 61 63 65 68 6f 6c 64 65 72 2e 0a 20 20 | .*.the.specified.placeholder.... |
c5c0 | 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 4e 61 6d 65 | ..*.....*.@param....string..Name |
c5e0 | 20 6f 66 20 74 68 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 79 6f 75 27 72 65 20 73 65 61 72 63 | .of.the.placeholder.you're.searc |
c600 | 68 69 6e 67 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 4e 61 6d | hing.....*.@param....string..Nam |
c620 | 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 6b 20 74 6f 20 73 63 61 6e 2e 20 49 66 20 6c 65 66 74 20 | e.of.the.block.to.scan..If.left. |
c640 | 6f 75 74 20 28 64 65 66 61 75 6c 74 29 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 | out.(default).....*............. |
c660 | 20 20 20 20 20 20 61 6c 6c 20 62 6c 6f 63 6b 73 20 61 72 65 20 73 63 61 6e 6e 65 64 2e 0a 20 20 | ......all.blocks.are.scanned.... |
c680 | 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 73 74 72 69 6e 67 20 20 4e 61 6d 65 20 6f 66 20 74 68 | ..*.@return...string..Name.of.th |
c6a0 | 65 20 28 66 69 72 73 74 29 20 62 6c 6f 63 6b 20 74 68 61 74 20 63 6f 6e 74 61 69 6e 73 0a 20 20 | e.(first).block.that.contains... |
c6c0 | 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 73 70 65 63 69 66 | ..*...................the.specif |
c6e0 | 69 65 64 20 70 6c 61 63 65 68 6f 6c 64 65 72 2e 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 | ied.placeholder......*.......... |
c700 | 20 20 20 20 20 20 20 20 20 49 66 20 74 68 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 77 61 73 20 | .........If.the.placeholder.was. |
c720 | 6e 6f 74 20 66 6f 75 6e 64 20 6f 72 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 65 64 0a 20 20 | not.found.or.an.error.occured... |
c740 | 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 6e 20 65 6d 70 74 79 20 73 | ..*...................an.empty.s |
c760 | 74 72 69 6e 67 20 69 73 20 72 65 74 75 72 6e 65 64 2e 0a 20 20 20 20 2a 20 40 74 68 72 6f 77 73 | tring.is.returned......*.@throws |
c780 | 20 20 20 49 54 5f 45 72 72 6f 72 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c | ...IT_Error.....*.@access...publ |
c7a0 | 69 63 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 70 6c 61 63 65 68 6f 6c 64 | ic.....*/.....function.placehold |
c7c0 | 65 72 45 78 69 73 74 73 28 24 70 6c 61 63 65 68 6f 6c 64 65 72 2c 20 24 62 6c 6f 63 6b 20 3d 20 | erExists($placeholder,.$block.=. |
c7e0 | 27 27 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 27 27 20 3d 3d 20 24 70 6c 61 | '').....{.........if.(''.==.$pla |
c800 | 63 65 68 6f 6c 64 65 72 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 6e 65 77 20 49 54 5f 45 | ceholder).{.............new.IT_E |
c820 | 72 72 6f 72 28 27 4e 6f 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 6e 61 6d 65 20 67 69 76 65 6e 2e | rror('No.placeholder.name.given. |
c840 | 27 2c 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f 29 3b 0a 20 20 20 20 20 20 20 20 | ',.__FILE__,.__LINE__);......... |
c860 | 20 20 20 20 72 65 74 75 72 6e 20 27 27 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 | ....return.'';.........}........ |
c880 | 20 20 69 66 20 28 27 27 20 21 3d 20 24 62 6c 6f 63 6b 20 26 26 20 21 69 73 73 65 74 28 24 74 68 | ..if.(''.!=.$block.&&.!isset($th |
c8a0 | 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a 20 20 20 20 20 20 | is->blocklist[$block])).{....... |
c8c0 | 20 20 20 20 20 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 22 55 6e 6b 6e 6f 77 6e 20 62 6c 6f 63 | ......new.IT_Error("Unknown.bloc |
c8e0 | 6b 20 27 24 62 6c 6f 63 6b 27 2e 22 2c 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f | k.'$block'.",.__FILE__,.__LINE__ |
c900 | 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 27 27 3b 0a 20 20 20 20 20 20 | );.............return.'';....... |
c920 | 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 6e 61 6d 65 20 6f 66 20 74 68 65 20 62 6c 6f 63 | ..}..........//.name.of.the.bloc |
c940 | 6b 20 77 68 65 72 65 20 74 68 65 20 67 69 76 65 6e 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 77 61 | k.where.the.given.placeholder.wa |
c960 | 73 20 66 6f 75 6e 64 0a 20 20 20 20 20 20 20 20 24 66 6f 75 6e 64 20 3d 20 27 27 3b 0a 0a 20 20 | s.found.........$found.=.'';.... |
c980 | 20 20 20 20 20 20 69 66 20 28 27 27 20 21 3d 20 24 62 6c 6f 63 6b 29 20 7b 0a 0a 20 20 20 20 20 | ......if.(''.!=.$block).{....... |
c9a0 | 20 20 20 20 20 20 20 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 76 61 72 69 61 62 6c 65 73 20 3d | .......if.(is_array($variables.= |
c9c0 | 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 29 29 | .$this->blockvariables[$block])) |
c9e0 | 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 65 61 72 63 68 20 74 68 | .{..................//.search.th |
ca00 | 65 20 76 61 6c 75 65 20 69 6e 20 74 68 65 20 6c 69 73 74 20 6f 66 20 62 6c 6f 63 6b 76 61 72 69 | e.value.in.the.list.of.blockvari |
ca20 | 61 62 6c 65 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 65 74 28 24 76 61 72 | ables.................reset($var |
ca40 | 69 61 62 6c 65 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 | iables);.................while.( |
ca60 | 6c 69 73 74 28 24 6b 2c 20 24 76 61 72 69 61 62 6c 65 29 20 3d 20 65 61 63 68 28 24 76 61 72 69 | list($k,.$variable).=.each($vari |
ca80 | 61 62 6c 65 73 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | ables)).{.....................if |
caa0 | 20 28 24 6b 20 3d 3d 20 24 70 6c 61 63 65 68 6f 6c 64 65 72 29 20 7b 0a 20 20 20 20 20 20 20 20 | .($k.==.$placeholder).{......... |
cac0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 66 6f 75 6e 64 20 3d 20 24 62 6c 6f 63 6b 3b | ................$found.=.$block; |
cae0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a | .........................break;. |
cb00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 | ....................}........... |
cb20 | 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d | ......}.............}..........} |
cb40 | 20 65 6c 73 65 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 73 65 61 72 63 68 20 61 | .else.{..............//.search.a |
cb60 | 6c 6c 20 62 6c 6f 63 6b 73 20 61 6e 64 20 72 65 74 75 72 6e 20 74 68 65 20 6e 61 6d 65 20 6f 66 | ll.blocks.and.return.the.name.of |
cb80 | 20 74 68 65 20 66 69 72 73 74 20 62 6c 6f 63 6b 20 74 68 61 74 0a 20 20 20 20 20 20 20 20 20 20 | .the.first.block.that........... |
cba0 | 20 20 2f 2f 20 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 0a 20 20 | ..//.contains.the.placeholder... |
cbc0 | 20 20 20 20 20 20 20 20 20 20 72 65 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 | ..........reset($this->blockvari |
cbe0 | 61 62 6c 65 73 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 69 73 74 28 | ables);.............while.(list( |
cc00 | 24 62 6c 6f 63 6b 6e 61 6d 65 2c 20 24 76 61 72 69 61 62 6c 65 73 29 20 3d 20 65 61 63 68 28 24 | $blockname,.$variables).=.each($ |
cc20 | 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 29 29 7b 0a 0a 20 20 20 20 20 20 20 | this->blockvariables)){......... |
cc40 | 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 5f 61 72 72 61 79 28 24 76 61 72 69 61 62 6c 65 73 | .........if.(is_array($variables |
cc60 | 29 20 26 26 20 69 73 73 65 74 28 24 76 61 72 69 61 62 6c 65 73 5b 24 70 6c 61 63 65 68 6f 6c 64 | ).&&.isset($variables[$placehold |
cc80 | 65 72 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 66 6f 75 | er])).{.....................$fou |
cca0 | 6e 64 20 3d 20 24 62 6c 6f 63 6b 6e 61 6d 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | nd.=.$blockname;................ |
ccc0 | 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 | .....break;.................}... |
cce0 | 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | ..........}..........}.......... |
cd00 | 72 65 74 75 72 6e 20 24 66 6f 75 6e 64 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 | return.$found;.....}.//.end.func |
cd20 | 20 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 | .placeholderExists....../**..... |
cd40 | 2a 20 43 68 65 63 6b 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 66 75 6e 63 74 69 6f 6e 20 63 61 | *.Checks.the.list.of.function.ca |
cd60 | 6c 6c 73 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 61 6e 64 0a 20 20 20 20 2a 20 63 61 | lls.in.the.template.and.....*.ca |
cd80 | 6c 6c 73 20 74 68 65 69 72 20 63 61 6c 6c 62 61 63 6b 20 66 75 6e 63 74 69 6f 6e 2e 0a 20 20 20 | lls.their.callback.function..... |
cda0 | 20 2a 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a | .*.....*.@access....public.....* |
cdc0 | 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 70 65 72 66 6f 72 6d 43 61 6c 6c 62 61 63 6b 28 29 | /.....function.performCallback() |
cde0 | 0a 20 20 20 20 7b 0a 0a 20 20 20 20 20 20 20 20 72 65 73 65 74 28 24 74 68 69 73 2d 3e 66 75 6e | .....{..........reset($this->fun |
ce00 | 63 74 69 6f 6e 73 29 3b 0a 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 69 73 74 28 24 66 75 | ctions);.........while.(list($fu |
ce20 | 6e 63 5f 69 64 2c 20 24 66 75 6e 63 74 69 6f 6e 29 20 3d 20 65 61 63 68 28 24 74 68 69 73 2d 3e | nc_id,.$function).=.each($this-> |
ce40 | 66 75 6e 63 74 69 6f 6e 73 29 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 | functions)).{..............if.(i |
ce60 | 73 73 65 74 28 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 63 6b 5b 24 66 75 6e 63 74 69 6f 6e 5b 27 | sset($this->callback[$function[' |
ce80 | 6e 61 6d 65 27 5d 5d 29 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | name']])).{..................if. |
cea0 | 28 27 27 20 21 3d 20 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 63 6b 5b 24 66 75 6e 63 74 69 6f 6e | (''.!=.$this->callback[$function |
cec0 | 5b 27 6e 61 6d 65 27 5d 5d 5b 27 6f 62 6a 65 63 74 27 5d 29 20 7b 0a 20 20 20 20 20 20 20 20 20 | ['name']]['object']).{.......... |
cee0 | 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b | ...........$this->variableCache[ |
cf00 | 27 5f 5f 66 75 6e 63 74 69 6f 6e 27 20 2e 20 24 66 75 6e 63 5f 69 64 20 2e 20 27 5f 5f 27 5d 20 | '__function'...$func_id...'__']. |
cf20 | 3d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 6c 6c 5f 75 | =.........................call_u |
cf40 | 73 65 72 5f 66 75 6e 63 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ser_func(....................... |
cf60 | 20 20 61 72 72 61 79 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..array(........................ |
cf80 | 20 26 24 47 4c 4f 42 41 4c 53 5b 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 63 6b 5b 24 66 75 6e 63 | .&$GLOBALS[$this->callback[$func |
cfa0 | 74 69 6f 6e 5b 27 6e 61 6d 65 27 5d 5d 5b 27 6f 62 6a 65 63 74 27 5d 5d 2c 0a 20 20 20 20 20 20 | tion['name']]['object']],....... |
cfc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 63 | ..................$this->callbac |
cfe0 | 6b 5b 24 66 75 6e 63 74 69 6f 6e 5b 27 6e 61 6d 65 27 5d 5d 5b 27 66 75 6e 63 74 69 6f 6e 27 5d | k[$function['name']]['function'] |
d000 | 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 66 75 6e 63 | ),.........................$func |
d020 | 74 69 6f 6e 5b 27 61 72 67 73 27 5d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | tion['args'].................... |
d040 | 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a | ....);.................}.else.{. |
d060 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 76 61 72 69 61 | ....................$this->varia |
d080 | 62 6c 65 43 61 63 68 65 5b 27 5f 5f 66 75 6e 63 74 69 6f 6e 27 20 2e 20 24 66 75 6e 63 5f 69 64 | bleCache['__function'...$func_id |
d0a0 | 20 2e 20 27 5f 5f 27 5d 20 3d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...'__'].=...................... |
d0c0 | 20 20 20 20 20 20 20 63 61 6c 6c 5f 75 73 65 72 5f 66 75 6e 63 28 0a 20 20 20 20 20 20 20 20 20 | .......call_user_func(.......... |
d0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 | ...................$this->callba |
d100 | 63 6b 5b 24 66 75 6e 63 74 69 6f 6e 5b 27 6e 61 6d 65 27 5d 5d 5b 27 66 75 6e 63 74 69 6f 6e 27 | ck[$function['name']]['function' |
d120 | 5d 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 | ],.............................$ |
d140 | 66 75 6e 63 74 69 6f 6e 5b 27 61 72 67 73 27 5d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | function['args']................ |
d160 | 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 | .........);.................}... |
d180 | 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 7d 20 2f | ...........}..........}......}./ |
d1a0 | 2f 20 65 6e 64 20 66 75 6e 63 20 70 65 72 66 6f 72 6d 43 61 6c 6c 62 61 63 6b 0a 0a 20 20 20 20 | /.end.func.performCallback...... |
d1c0 | 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 74 75 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 61 6c 6c 20 | /**.....*.Returns.a.list.of.all. |
d1e0 | 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 73 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 65 | function.calls.in.the.current.te |
d200 | 6d 70 6c 61 74 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 61 72 | mplate......*.....*.@return...ar |
d220 | 72 61 79 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a | ray.....*.@access...public.....* |
d240 | 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 46 75 6e 63 74 69 6f 6e 63 61 6c 6c 73 28 | /.....function.getFunctioncalls( |
d260 | 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 74 68 69 73 2d 3e 66 75 | ).....{.........return.$this->fu |
d280 | 6e 63 74 69 6f 6e 73 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 67 65 74 46 75 | nctions;.....}.//.end.func.getFu |
d2a0 | 6e 63 74 69 6f 6e 63 61 6c 6c 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 70 6c 61 | nctioncalls....../**.....*.Repla |
d2c0 | 63 65 73 20 61 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 20 77 69 74 68 20 74 68 65 20 67 69 76 | ces.a.function.call.with.the.giv |
d2e0 | 65 6e 20 72 65 70 6c 61 63 65 6d 65 6e 74 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 | en.replacement......*.....*.@par |
d300 | 61 6d 20 20 20 20 69 6e 74 20 20 20 20 20 20 20 46 75 6e 63 74 69 6f 6e 20 49 44 0a 20 20 20 20 | am....int.......Function.ID..... |
d320 | 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 52 65 70 6c 61 63 65 6d 65 6e | *.@param....string....Replacemen |
d340 | 74 0a 20 20 20 20 2a 20 40 64 65 70 72 65 63 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 | t.....*.@deprec.....*/.....funct |
d360 | 69 6f 6e 20 73 65 74 46 75 6e 63 74 69 6f 6e 63 6f 6e 74 65 6e 74 28 24 66 75 6e 63 74 69 6f 6e | ion.setFunctioncontent($function |
d380 | 49 44 2c 20 24 72 65 70 6c 61 63 65 6d 65 6e 74 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 | ID,.$replacement).....{......... |
d3a0 | 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 43 61 63 68 65 5b 27 5f 5f 66 75 6e 63 74 69 6f 6e | $this->variableCache['__function |
d3c0 | 27 20 2e 20 24 66 75 6e 63 74 69 6f 6e 49 44 20 2e 20 27 5f 5f 27 5d 20 3d 20 24 72 65 70 6c 61 | '...$functionID...'__'].=.$repla |
d3e0 | 63 65 6d 65 6e 74 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 73 65 74 46 75 6e | cement;.....}.//.end.func.setFun |
d400 | 63 74 69 6f 6e 63 6f 6e 74 65 6e 74 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 53 65 74 73 | ctioncontent....../**.....*.Sets |
d420 | 20 61 20 63 61 6c 6c 62 61 63 6b 20 66 75 6e 63 74 69 6f 6e 2e 0a 20 20 20 20 2a 0a 20 20 20 20 | .a.callback.function......*..... |
d440 | 2a 20 49 54 5b 58 5d 20 74 65 6d 70 6c 61 74 65 73 20 28 6e 6f 74 65 20 74 68 65 20 58 29 20 63 | *.IT[X].templates.(note.the.X).c |
d460 | 61 6e 20 63 6f 6e 74 61 69 6e 20 73 69 6d 70 6c 65 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 73 | an.contain.simple.function.calls |
d480 | 2e 0a 20 20 20 20 2a 20 22 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 22 20 6d 65 61 6e 73 20 74 68 | ......*."function.call".means.th |
d4a0 | 61 74 20 74 68 65 20 65 64 69 74 6f 72 20 6f 66 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 63 61 | at.the.editor.of.the.template.ca |
d4c0 | 6e 20 61 64 64 0a 20 20 20 20 2a 20 73 70 65 63 69 61 6c 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 | n.add.....*.special.placeholder. |
d4e0 | 74 6f 20 74 68 65 20 74 65 6d 70 6c 61 74 65 20 6c 69 6b 65 20 27 66 75 6e 63 5f 68 31 28 22 65 | to.the.template.like.'func_h1("e |
d500 | 6d 62 65 64 64 65 64 20 69 6e 20 68 31 22 29 27 2e 0a 20 20 20 20 2a 20 49 54 5b 58 5d 20 77 69 | mbedded.in.h1")'......*.IT[X].wi |
d520 | 6c 6c 20 67 72 61 62 20 74 68 69 73 20 66 75 6e 63 74 69 6f 6e 20 63 61 6c 6c 73 20 61 6e 64 20 | ll.grab.this.function.calls.and. |
d540 | 61 6c 6c 6f 77 20 79 6f 75 20 74 6f 20 64 65 66 69 6e 65 20 61 20 63 61 6c 6c 62 61 63 6b 0a 20 | allow.you.to.define.a.callback.. |
d560 | 20 20 20 2a 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20 74 68 65 6d 2e 0a 20 20 20 20 2a 0a 20 20 | ...*.function.for.them......*... |
d580 | 20 20 2a 20 54 68 69 73 20 69 73 20 61 6e 20 61 62 73 6f 6c 75 74 65 6c 79 20 65 76 69 6c 20 66 | ..*.This.is.an.absolutely.evil.f |
d5a0 | 65 61 74 75 72 65 2e 20 49 66 20 79 6f 75 72 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 6d 61 6b 65 | eature..If.your.application.make |
d5c0 | 73 20 68 65 61 76 79 0a 20 20 20 20 2a 20 75 73 65 20 6f 66 20 73 75 63 68 20 63 61 6c 6c 62 61 | s.heavy.....*.use.of.such.callba |
d5e0 | 63 6b 73 20 61 6e 64 20 79 6f 75 27 72 65 20 65 76 65 6e 20 69 6d 70 6c 65 6d 65 6e 74 69 6e 67 | cks.and.you're.even.implementing |
d600 | 20 69 66 2d 74 68 65 6e 20 65 74 63 2e 20 6f 6e 0a 20 20 20 20 2a 20 74 68 65 20 6c 65 76 65 6c | .if-then.etc..on.....*.the.level |
d620 | 20 6f 66 20 61 20 74 65 6d 70 6c 61 74 65 20 65 6e 67 69 6e 65 20 79 6f 75 27 72 65 20 72 65 69 | .of.a.template.engine.you're.rei |
d640 | 76 65 6e 74 69 6e 67 20 74 68 65 20 77 68 65 65 6c 2e 2e 2e 20 2d 20 74 68 61 74 27 73 0a 20 20 | venting.the.wheel....-.that's... |
d660 | 20 20 2a 20 61 63 74 75 61 6c 6c 79 20 68 6f 77 20 50 48 50 20 63 61 6d 65 20 69 6e 74 6f 20 6c | ..*.actually.how.PHP.came.into.l |
d680 | 69 66 65 2e 20 41 6e 79 77 61 79 2c 20 73 6f 6d 65 74 69 6d 65 73 20 69 74 27 73 20 68 61 6e 64 | ife..Anyway,.sometimes.it's.hand |
d6a0 | 79 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 43 6f 6e 73 69 64 65 72 20 61 6c 73 6f 20 75 73 69 | y......*.....*.Consider.also.usi |
d6c0 | 6e 67 20 58 4d 4c 2f 58 53 4c 54 20 6f 72 20 6e 61 74 69 76 65 20 50 48 50 2e 20 41 6e 64 20 70 | ng.XML/XSLT.or.native.PHP..And.p |
d6e0 | 6c 65 61 73 65 20 64 6f 20 6e 6f 74 20 70 75 73 68 0a 20 20 20 20 2a 20 49 54 5b 58 5d 20 61 6e | lease.do.not.push.....*.IT[X].an |
d700 | 79 20 66 75 72 74 68 65 72 20 69 6e 74 6f 20 74 68 69 73 20 64 69 72 65 63 74 69 6f 6e 20 6f 66 | y.further.into.this.direction.of |
d720 | 20 61 64 64 69 6e 67 20 6c 6f 67 69 63 73 20 74 6f 20 74 68 65 20 74 65 6d 70 6c 61 74 65 0a 20 | .adding.logics.to.the.template.. |
d740 | 20 20 20 2a 20 65 6e 67 69 6e 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 46 6f 72 20 74 68 6f | ...*.engine......*.....*.For.tho |
d760 | 73 65 20 6f 66 20 79 6f 75 20 72 65 61 64 79 20 66 6f 72 20 74 68 65 20 58 20 69 6e 20 49 54 5b | se.of.you.ready.for.the.X.in.IT[ |
d780 | 58 5d 3a 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 3c 3f 70 68 70 0a 20 20 20 20 2a 20 2e 2e 2e 0a | X]:.....*.....*.<?php.....*..... |
d7a0 | 20 20 20 20 2a 20 66 75 6e 63 74 69 6f 6e 20 68 5f 6f 6e 65 28 24 61 72 67 73 29 20 7b 0a 20 20 | ....*.function.h_one($args).{... |
d7c0 | 20 20 2a 20 20 20 20 72 65 74 75 72 6e 20 73 70 72 69 6e 74 66 28 27 3c 68 31 3e 25 73 3c 2f 68 | ..*....return.sprintf('<h1>%s</h |
d7e0 | 31 3e 27 2c 20 24 61 72 67 73 5b 30 5d 29 3b 0a 20 20 20 20 2a 20 7d 0a 20 20 20 20 2a 0a 20 20 | 1>',.$args[0]);.....*.}.....*... |
d800 | 20 20 2a 20 2e 2e 2e 0a 20 20 20 20 2a 20 24 69 74 78 20 3d 20 6e 65 77 20 48 54 4d 4c 5f 54 65 | ..*.........*.$itx.=.new.HTML_Te |
d820 | 6d 70 6c 61 74 65 5f 49 54 58 28 20 2e 2e 2e 20 29 3b 0a 20 20 20 20 2a 20 2e 2e 2e 0a 20 20 20 | mplate_ITX(.....);.....*........ |
d840 | 20 2a 20 24 69 74 78 2d 3e 73 65 74 43 61 6c 6c 62 61 63 6b 46 75 6e 63 74 69 6f 6e 28 27 68 31 | .*.$itx->setCallbackFunction('h1 |
d860 | 27 2c 20 27 68 5f 6f 6e 65 27 29 3b 0a 20 20 20 20 2a 20 24 69 74 78 2d 3e 70 65 72 66 6f 72 6d | ',.'h_one');.....*.$itx->perform |
d880 | 43 61 6c 6c 62 61 63 6b 28 29 3b 0a 20 20 20 20 2a 20 3f 3e 0a 20 20 20 20 2a 0a 20 20 20 20 2a | Callback();.....*.?>.....*.....* |
d8a0 | 20 74 65 6d 70 6c 61 74 65 3a 0a 20 20 20 20 2a 20 66 75 6e 63 5f 68 31 28 27 48 31 20 48 65 61 | .template:.....*.func_h1('H1.Hea |
d8c0 | 64 6c 69 6e 65 27 29 3b 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 | dline');.....*.....*.@param....s |
d8e0 | 74 72 69 6e 67 20 20 20 20 46 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 20 69 6e 20 74 68 65 20 74 65 | tring....Function.name.in.the.te |
d900 | 6d 70 6c 61 74 65 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 | mplate.....*.@param....string... |
d920 | 20 4e 61 6d 65 20 6f 66 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 66 75 6e 63 74 69 6f 6e 0a 20 | .Name.of.the.callback.function.. |
d940 | 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 4e 61 6d 65 20 6f 66 | ...*.@param....string....Name.of |
d960 | 20 74 68 65 20 63 61 6c 6c 62 61 63 6b 20 6f 62 6a 65 63 74 0a 20 20 20 20 2a 20 40 72 65 74 75 | .the.callback.object.....*.@retu |
d980 | 72 6e 20 20 20 62 6f 6f 6c 65 61 6e 20 20 20 46 61 6c 73 65 20 6f 6e 20 66 61 69 6c 75 72 65 2e | rn...boolean...False.on.failure. |
d9a0 | 0a 20 20 20 20 2a 20 40 74 68 72 6f 77 73 20 20 20 49 54 5f 45 72 72 6f 72 0a 20 20 20 20 2a 20 | .....*.@throws...IT_Error.....*. |
d9c0 | 40 61 63 63 65 73 73 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 | @access...public.....*/.....func |
d9e0 | 74 69 6f 6e 0a 20 20 20 20 73 65 74 43 61 6c 6c 62 61 63 6b 46 75 6e 63 74 69 6f 6e 28 24 74 70 | tion.....setCallbackFunction($tp |
da00 | 6c 66 75 6e 63 74 69 6f 6e 2c 20 24 63 61 6c 6c 62 61 63 6b 66 75 6e 63 74 69 6f 6e 2c 20 24 63 | lfunction,.$callbackfunction,.$c |
da20 | 61 6c 6c 62 61 63 6b 6f 62 6a 65 63 74 20 3d 20 27 27 29 0a 20 20 20 20 7b 0a 0a 20 20 20 20 20 | allbackobject.=.'').....{....... |
da40 | 20 20 20 69 66 20 28 27 27 20 3d 3d 20 24 74 70 6c 66 75 6e 63 74 69 6f 6e 20 7c 7c 20 27 27 20 | ...if.(''.==.$tplfunction.||.''. |
da60 | 3d 3d 20 24 63 61 6c 6c 62 61 63 6b 66 75 6e 63 74 69 6f 6e 29 20 7b 0a 20 20 20 20 20 20 20 20 | ==.$callbackfunction).{......... |
da80 | 20 20 20 20 72 65 74 75 72 6e 20 6e 65 77 20 49 54 5f 45 72 72 6f 72 28 0a 20 20 20 20 20 20 20 | ....return.new.IT_Error(........ |
daa0 | 20 20 20 20 20 20 20 20 20 22 4e 6f 20 74 65 6d 70 6c 61 74 65 20 66 75 6e 63 74 69 6f 6e 20 22 | ........."No.template.function." |
dac0 | 2e 22 28 27 24 74 70 6c 66 75 6e 63 74 69 6f 6e 27 29 22 2e 0a 20 20 20 20 20 20 20 20 20 20 20 | ."('$tplfunction')"............. |
dae0 | 20 20 20 20 20 22 20 61 6e 64 2f 6f 72 20 6e 6f 20 63 61 6c 6c 62 61 63 6b 20 66 75 6e 63 74 69 | .....".and/or.no.callback.functi |
db00 | 6f 6e 20 28 27 24 63 61 6c 6c 62 61 63 6b 27 29 20 67 69 76 65 6e 2e 22 2c 0a 20 20 20 20 20 20 | on.('$callback').given.",....... |
db20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 5f 46 49 4c 45 5f 5f 2c 20 5f 5f 4c 49 4e 45 5f 5f | ..............__FILE__,.__LINE__ |
db40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 | .................);.........}... |
db60 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 63 6b 5b 24 74 70 6c 66 75 6e 63 74 69 | ......$this->callback[$tplfuncti |
db80 | 6f 6e 5d 20 3d 20 61 72 72 61 79 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | on].=.array(.................... |
dba0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 66 75 6e 63 74 69 6f 6e | ......................."function |
dbc0 | 22 20 20 20 20 3d 3e 20 24 63 61 6c 6c 62 61 63 6b 66 75 6e 63 74 69 6f 6e 2c 0a 20 20 20 20 20 | "....=>.$callbackfunction,...... |
dbe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
dc00 | 20 20 20 20 20 22 6f 62 6a 65 63 74 22 20 20 20 20 20 20 20 20 3d 3e 20 24 63 61 6c 6c 62 61 63 | ....."object"........=>.$callbac |
dc20 | 6b 6f 62 6a 65 63 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | kobject......................... |
dc40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 | ................);..........retu |
dc60 | 72 6e 20 74 72 75 65 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 73 65 74 43 61 | rn.true;.....}.//.end.func.setCa |
dc80 | 6c 6c 62 61 63 6b 46 75 6e 63 74 69 6f 6e 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 53 65 | llbackFunction....../**.....*.Se |
dca0 | 74 73 20 74 68 65 20 43 61 6c 6c 62 61 63 6b 20 66 75 6e 63 74 69 6f 6e 20 6c 6f 6f 6b 75 70 20 | ts.the.Callback.function.lookup. |
dcc0 | 74 61 62 6c 65 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 61 72 72 61 | table.....*.....*.@param....arra |
dce0 | 79 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 61 62 6c 65 0a 20 20 20 20 2a 20 20 20 20 20 20 20 | y....function.table.....*....... |
dd00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 5b 74 65 6d 70 6c 61 74 65 66 75 6e 63 74 | .............array[templatefunct |
dd20 | 69 6f 6e 5d 20 3d 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ion].=.....*.................... |
dd40 | 20 20 20 61 72 72 61 79 28 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ...array(.....*................. |
dd60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 66 75 6e 63 74 69 6f 6e 22 20 3d 3e 20 75 73 65 72 | .............."function".=>.user |
dd80 | 66 75 6e 63 74 69 6f 6e 2c 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | function,.....*................. |
dda0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 6f 62 6a 65 63 74 22 20 3d 3e 20 75 73 65 72 6f 62 | .............."object".=>.userob |
ddc0 | 6a 65 63 74 0a 20 20 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ject.....*...................... |
dde0 | 20 29 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a | .).....*.@access....public.....* |
de00 | 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 43 61 6c 6c 62 61 63 6b 46 75 6e 74 69 6f | /.....function.setCallbackFuntio |
de20 | 6e 74 61 62 6c 65 28 24 66 75 6e 63 74 69 6f 6e 73 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 | ntable($functions).....{........ |
de40 | 20 24 74 68 69 73 2d 3e 63 61 6c 6c 62 61 63 6b 20 3d 20 24 66 75 6e 63 74 69 6f 6e 73 3b 0a 20 | .$this->callback.=.$functions;.. |
de60 | 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 73 65 74 43 61 6c 6c 62 61 63 6b 46 75 6e 63 | ...}.//.end.func.setCallbackFunc |
de80 | 74 69 6f 6e 74 61 62 6c 65 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 63 75 72 73 69 | tiontable....../**.....*.Recursi |
dea0 | 76 65 6c 79 20 72 65 6d 6f 76 65 73 20 61 6c 6c 20 64 61 74 61 20 61 73 73 69 63 69 61 74 65 64 | vely.removes.all.data.assiciated |
dec0 | 20 77 69 74 68 20 61 20 62 6c 6f 63 6b 2c 20 69 6e 63 6c 75 64 69 6e 67 20 61 6c 6c 20 69 6e 6e | .with.a.block,.including.all.inn |
dee0 | 65 72 20 62 6c 6f 63 6b 73 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 | er.blocks.....*.....*.@param.... |
df00 | 73 74 72 69 6e 67 20 20 62 6c 6f 63 6b 20 74 6f 20 62 65 20 72 65 6d 6f 76 65 64 0a 20 20 20 20 | string..block.to.be.removed..... |
df20 | 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 72 65 6d 6f 76 65 42 6c 6f 63 6b 44 61 74 61 28 | */.....function.removeBlockData( |
df40 | 24 62 6c 6f 63 6b 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 73 73 65 74 28 | $block).....{.........if.(isset( |
df60 | 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a 20 20 | $this->blockinner[$block])).{... |
df80 | 20 20 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 | ..........foreach.($this->blocki |
dfa0 | 6e 6e 65 72 5b 24 62 6c 6f 63 6b 5d 20 61 73 20 24 6b 20 3d 3e 20 24 69 6e 6e 65 72 29 20 7b 0a | nner[$block].as.$k.=>.$inner).{. |
dfc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 72 65 6d 6f 76 65 42 6c 6f | ................$this->removeBlo |
dfe0 | 63 6b 44 61 74 61 28 24 69 6e 6e 65 72 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 | ckData($inner);.............}... |
e000 | 20 20 20 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e | ...........unset($this->blockinn |
e020 | 65 72 5b 24 62 6c 6f 63 6b 5d 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | er[$block]);.........}.......... |
e040 | 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d 29 3b | unset($this->blocklist[$block]); |
e060 | 0a 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 64 61 74 61 5b | .........unset($this->blockdata[ |
e080 | 24 62 6c 6f 63 6b 5d 29 3b 0a 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 62 | $block]);.........unset($this->b |
e0a0 | 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 29 3b 0a 20 20 20 20 20 20 20 20 | lockvariables[$block]);......... |
e0c0 | 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 74 6f 75 63 68 65 64 42 6c 6f 63 6b 73 5b 24 62 6c 6f 63 | unset($this->touchedBlocks[$bloc |
e0e0 | 6b 5d 29 3b 0a 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 72 65 6d 6f 76 65 42 6c | k]);......}.//.end.func.removeBl |
e100 | 6f 63 6b 69 6e 6e 65 72 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 74 75 72 6e 73 20 | ockinner....../**.....*.Returns. |
e120 | 61 20 6c 69 73 74 20 6f 66 20 62 6c 6f 63 6b 6e 61 6d 65 73 20 69 6e 20 74 68 65 20 74 65 6d 70 | a.list.of.blocknames.in.the.temp |
e140 | 6c 61 74 65 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 20 61 72 72 | late......*.....*.@return....arr |
e160 | 61 79 20 20 20 20 5b 62 6c 6f 63 6b 6e 61 6d 65 20 3d 3e 20 62 6c 6f 63 6b 6e 61 6d 65 5d 0a 20 | ay....[blockname.=>.blockname].. |
e180 | 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a 20 40 73 65 | ...*.@access....public.....*.@se |
e1a0 | 65 20 20 20 20 20 20 20 20 62 6c 6f 63 6b 45 78 69 73 74 73 28 29 0a 20 20 20 20 2a 2f 0a 20 20 | e........blockExists().....*/... |
e1c0 | 20 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 6c 6f 63 6b 6c 69 73 74 28 29 0a 20 20 20 20 7b 0a | ..function.getBlocklist().....{. |
e1e0 | 20 20 20 20 20 20 20 20 24 62 6c 6f 63 6b 6c 69 73 74 20 3d 20 61 72 72 61 79 28 29 3b 0a 20 20 | ........$blocklist.=.array();... |
e200 | 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 20 | ......foreach.($this->blocklist. |
e220 | 61 73 20 24 62 6c 6f 63 6b 20 3d 3e 20 24 63 6f 6e 74 65 6e 74 29 20 7b 0a 20 20 20 20 20 20 20 | as.$block.=>.$content).{........ |
e240 | 20 20 20 20 20 24 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d 20 3d 20 24 62 6c 6f 63 6b | .....$blocklist[$block].=.$block |
e260 | 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 62 6c 6f | ;.........}..........return.$blo |
e280 | 63 6b 6c 69 73 74 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 67 65 74 42 6c 6f | cklist;.....}.//.end.func.getBlo |
e2a0 | 63 6b 6c 69 73 74 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 43 68 65 63 6b 73 20 77 68 65 | cklist....../**.....*.Checks.whe |
e2c0 | 74 65 72 20 61 20 62 6c 6f 63 6b 20 65 78 69 73 74 73 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 | ter.a.block.exists......*.....*. |
e2e0 | 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 0a 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 | @param....string.....*.@return.. |
e300 | 20 20 62 6f 6f 6c 65 61 6e 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 75 62 6c 69 | ..boolean.....*.@access....publi |
e320 | 63 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 20 20 67 65 74 42 6c 6f 63 6b 6c 69 73 74 | c.....*.@see........getBlocklist |
e340 | 28 29 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 62 6c 6f 63 6b 45 78 69 73 | ().....*/.....function.blockExis |
e360 | 74 73 28 24 62 6c 6f 63 6b 6e 61 6d 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 72 65 74 | ts($blockname).....{.........ret |
e380 | 75 72 6e 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 | urn.isset($this->blocklist[$bloc |
e3a0 | 6b 6e 61 6d 65 5d 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 62 6c 6f 63 6b | kname]);.....}.//.end.func.block |
e3c0 | 45 78 69 73 74 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 52 65 74 75 72 6e 73 20 61 20 | Exists....../**.....*.Returns.a. |
e3e0 | 6c 69 73 74 20 6f 66 20 76 61 72 69 61 62 6c 65 73 20 6f 66 20 61 20 62 6c 6f 63 6b 2e 0a 20 20 | list.of.variables.of.a.block.... |
e400 | 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 42 6c | ..*.....*.@param....string....Bl |
e420 | 6f 63 6b 6e 61 6d 65 0a 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 20 61 72 72 61 79 20 20 | ockname.....*.@return....array.. |
e440 | 20 20 5b 76 61 72 6e 61 6d 65 20 3d 3e 20 76 61 72 6e 61 6d 65 5d 0a 20 20 20 20 2a 20 40 61 63 | ..[varname.=>.varname].....*.@ac |
e460 | 63 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 20 | cess....public.....*.@see....... |
e480 | 20 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 45 78 69 73 74 73 28 29 0a 20 20 20 20 2a 2f 0a 20 20 | .BlockvariableExists().....*/... |
e4a0 | 20 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 28 24 62 6c | ..function.getBlockvariables($bl |
e4c0 | 6f 63 6b 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 73 65 74 28 24 74 | ock).....{.........if.(!isset($t |
e4e0 | 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a | his->blockvariables[$block])).{. |
e500 | 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 61 72 72 61 79 28 29 3b 0a 20 20 20 20 | ............return.array();..... |
e520 | 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 24 76 61 72 69 61 62 6c 65 73 20 3d 20 61 72 72 61 | ....}..........$variables.=.arra |
e540 | 79 28 29 3b 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 74 68 69 73 2d 3e 62 6c 6f | y();.........foreach.($this->blo |
e560 | 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 20 61 73 20 24 76 61 72 69 61 62 6c 65 | ckvariables[$block].as.$variable |
e580 | 20 3d 3e 20 24 76 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 76 61 72 69 61 62 6c 65 73 | .=>.$v).{.............$variables |
e5a0 | 5b 24 76 61 72 69 61 62 6c 65 5d 20 3d 20 24 76 61 72 69 61 62 6c 65 3b 0a 20 20 20 20 20 20 20 | [$variable].=.$variable;........ |
e5c0 | 20 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 24 76 61 72 69 61 62 6c 65 73 3b 0a 20 | .}..........return.$variables;.. |
e5e0 | 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 67 65 74 42 6c 6f 63 6b 76 61 72 69 61 62 6c | ...}.//.end.func.getBlockvariabl |
e600 | 65 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 43 68 65 63 6b 73 20 77 68 65 74 65 72 20 | es....../**.....*.Checks.wheter. |
e620 | 61 20 62 6c 6f 63 6b 20 76 61 72 69 61 62 6c 65 20 65 78 69 73 74 73 2e 0a 20 20 20 20 2a 0a 20 | a.block.variable.exists......*.. |
e640 | 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 42 6c 6f 63 6b 6e 61 | ...*.@param....string....Blockna |
e660 | 6d 65 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 56 61 72 | me.....*.@param....string....Var |
e680 | 69 61 62 6c 65 6e 61 6d 65 0a 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 20 62 6f 6f 6c 65 | iablename.....*.@return....boole |
e6a0 | 61 6e 0a 20 20 20 20 2a 20 40 61 63 63 65 73 73 20 20 20 20 70 75 62 6c 69 63 0a 20 20 20 20 2a | an.....*.@access....public.....* |
e6c0 | 20 40 73 65 65 20 20 20 20 67 65 74 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 28 29 0a 20 20 20 | .@see....getBlockvariables().... |
e6e0 | 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 45 78 | .*/.....function.BlockvariableEx |
e700 | 69 73 74 73 28 24 62 6c 6f 63 6b 2c 20 24 76 61 72 69 61 62 6c 65 29 0a 20 20 20 20 7b 0a 20 20 | ists($block,.$variable).....{... |
e720 | 20 20 20 20 20 20 72 65 74 75 72 6e 20 69 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 | ......return.isset($this->blockv |
e740 | 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 5b 24 76 61 72 69 61 62 6c 65 5d 29 3b 0a 20 20 | ariables[$block][$variable]);... |
e760 | 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 45 78 69 | ..}.//.end.func.BlockvariableExi |
e780 | 73 74 73 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 42 75 69 6c 64 73 20 61 20 66 75 6e 63 | sts....../**.....*.Builds.a.func |
e7a0 | 74 69 6f 6e 6c 69 73 74 20 66 72 6f 6d 20 74 68 65 20 74 65 6d 70 6c 61 74 65 2e 0a 20 20 20 20 | tionlist.from.the.template...... |
e7c0 | 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 62 75 69 6c 64 46 75 6e 63 74 69 6f 6e 6c 69 73 | */.....function.buildFunctionlis |
e7e0 | 74 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 75 6e 63 74 69 6f | t().....{.........$this->functio |
e800 | 6e 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 | ns.=.array();..........$template |
e820 | 20 3d 20 24 74 68 69 73 2d 3e 74 65 6d 70 6c 61 74 65 3b 0a 20 20 20 20 20 20 20 20 24 6e 75 6d | .=.$this->template;.........$num |
e840 | 20 3d 20 30 3b 0a 0a 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 70 72 65 67 5f 6d 61 74 63 68 | .=.0;..........while.(preg_match |
e860 | 28 24 74 68 69 73 2d 3e 66 75 6e 63 74 69 6f 6e 52 65 67 45 78 70 2c 20 24 74 65 6d 70 6c 61 74 | ($this->functionRegExp,.$templat |
e880 | 65 2c 20 24 72 65 67 73 29 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 70 6f 73 20 3d | e,.$regs)).{..............$pos.= |
e8a0 | 20 73 74 72 70 6f 73 28 24 74 65 6d 70 6c 61 74 65 2c 20 24 72 65 67 73 5b 30 5d 29 3b 0a 20 20 | .strpos($template,.$regs[0]);... |
e8c0 | 20 20 20 20 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 20 3d 20 73 75 62 73 74 72 28 24 74 65 | ..........$template.=.substr($te |
e8e0 | 6d 70 6c 61 74 65 2c 20 24 70 6f 73 20 2b 20 73 74 72 6c 65 6e 28 24 72 65 67 73 5b 30 5d 29 29 | mplate,.$pos.+.strlen($regs[0])) |
e900 | 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 68 65 61 64 20 3d 20 24 74 68 69 73 2d 3e 67 65 | ;..............$head.=.$this->ge |
e920 | 74 56 61 6c 75 65 28 24 74 65 6d 70 6c 61 74 65 2c 20 27 29 27 29 3b 0a 20 20 20 20 20 20 20 20 | tValue($template,.')');......... |
e940 | 20 20 20 20 24 61 72 67 73 20 3d 20 61 72 72 61 79 28 29 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 | ....$args.=.array();............ |
e960 | 20 20 24 74 68 69 73 2d 3e 74 65 6d 70 6c 61 74 65 20 3d 20 73 74 72 5f 72 65 70 6c 61 63 65 28 | ..$this->template.=.str_replace( |
e980 | 24 72 65 67 73 5b 30 5d 20 2e 20 24 68 65 61 64 20 2e 20 27 29 27 2c 0a 20 20 20 20 20 20 20 20 | $regs[0]...$head...')',......... |
e9a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 7b 5f 5f 66 75 6e 63 | ........................'{__func |
e9c0 | 74 69 6f 6e 27 20 2e 20 24 6e 75 6d 20 2e 20 27 5f 5f 7d 27 2c 20 24 74 68 69 73 2d 3e 74 65 6d | tion'...$num...'__}',.$this->tem |
e9e0 | 70 6c 61 74 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | plate........................... |
ea00 | 20 20 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 65 6d 70 6c 61 74 65 20 3d 20 73 74 72 | ..);.............$template.=.str |
ea20 | 5f 72 65 70 6c 61 63 65 28 24 72 65 67 73 5b 30 5d 20 2e 20 24 68 65 61 64 20 2e 20 27 29 27 2c | _replace($regs[0]...$head...')', |
ea40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 7b 5f 5f 66 75 6e | .........................'{__fun |
ea60 | 63 74 69 6f 6e 27 20 2e 20 24 6e 75 6d 20 2e 20 27 5f 5f 7d 27 2c 20 24 74 65 6d 70 6c 61 74 65 | ction'...$num...'__}',.$template |
ea80 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 | .........................);..... |
eaa0 | 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 27 27 20 21 3d 20 24 68 65 61 64 20 26 26 20 24 | .........while.(''.!=.$head.&&.$ |
eac0 | 61 72 67 73 32 20 3d 20 24 74 68 69 73 2d 3e 67 65 74 56 61 6c 75 65 28 24 68 65 61 64 2c 20 27 | args2.=.$this->getValue($head,.' |
eae0 | 2c 27 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 61 72 67 32 20 3d 20 74 | ,')).{.................$arg2.=.t |
eb00 | 72 69 6d 28 24 61 72 67 73 32 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 61 72 | rim($args2);.................$ar |
eb20 | 67 73 5b 5d 20 3d 20 28 27 22 27 20 3d 3d 20 24 61 72 67 32 7b 30 7d 20 7c 7c 20 22 27 22 20 3d | gs[].=.('"'.==.$arg2{0}.||."'".= |
eb40 | 3d 20 24 61 72 67 32 7b 30 7d 29 20 3f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | =.$arg2{0}).?................... |
eb60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 75 62 73 74 72 28 24 61 72 67 32 2c 20 | ..................substr($arg2,. |
eb80 | 31 2c 20 2d 31 29 20 3a 20 24 61 72 67 32 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | 1,.-1).:.$arg2;................. |
eba0 | 69 66 20 28 24 61 72 67 32 20 3d 3d 20 24 68 65 61 64 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | if.($arg2.==.$head).{........... |
ebc0 | 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ..........break;................ |
ebe0 | 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 68 65 61 64 20 3d 20 73 75 62 73 74 | .}.................$head.=.subst |
ec00 | 72 28 24 68 65 61 64 2c 20 73 74 72 6c 65 6e 28 24 61 72 67 32 29 20 2b 20 31 29 3b 0a 20 20 20 | r($head,.strlen($arg2).+.1);.... |
ec20 | 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 66 | .........}..............$this->f |
ec40 | 75 6e 63 74 69 6f 6e 73 5b 24 6e 75 6d 2b 2b 5d 20 3d 20 61 72 72 61 79 28 0a 20 20 20 20 20 20 | unctions[$num++].=.array(....... |
ec60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
ec80 | 20 20 20 20 20 20 20 20 20 20 27 6e 61 6d 65 27 20 20 20 20 3d 3e 20 24 72 65 67 73 5b 31 5d 2c | ..........'name'....=>.$regs[1], |
eca0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
ecc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 61 72 67 73 27 20 20 20 20 3d 3e 20 24 61 | .................'args'....=>.$a |
ece0 | 72 67 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rgs............................. |
ed00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 | ................);.........}.... |
ed20 | 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 62 75 69 6c 64 46 75 6e 63 74 69 6f 6e 6c 69 73 | ..}.//.end.func.buildFunctionlis |
ed40 | 74 0a 0a 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 67 65 74 56 61 6c 75 65 28 24 63 6f 64 65 2c | t.......function.getValue($code, |
ed60 | 20 24 64 65 6c 69 6d 69 74 65 72 29 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 27 27 20 3d 3d | .$delimiter).{.........if.(''.== |
ed80 | 20 24 63 6f 64 65 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 27 27 3b | .$code).{.............return.''; |
eda0 | 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 5f 61 72 72 61 | .........}..........if.(!is_arra |
edc0 | 79 28 24 64 65 6c 69 6d 69 74 65 72 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 64 65 | y($delimiter)).{.............$de |
ede0 | 6c 69 6d 69 74 65 72 20 3d 20 61 72 72 61 79 28 20 24 64 65 6c 69 6d 69 74 65 72 20 3d 3e 20 74 | limiter.=.array(.$delimiter.=>.t |
ee00 | 72 75 65 20 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 24 6c 65 6e 20 20 | rue.);.........}..........$len.. |
ee20 | 20 20 20 20 20 20 20 3d 20 73 74 72 6c 65 6e 28 24 63 6f 64 65 29 3b 0a 20 20 20 20 20 20 20 20 | .......=.strlen($code);......... |
ee40 | 24 65 6e 63 6c 6f 73 65 64 20 20 20 20 3d 20 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 24 65 | $enclosed....=.false;.........$e |
ee60 | 6e 63 6c 6f 73 65 64 5f 62 79 20 3d 20 27 27 3b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 73 | nclosed_by.=.'';..........if.(is |
ee80 | 73 65 74 28 24 64 65 6c 69 6d 69 74 65 72 5b 24 63 6f 64 65 5b 30 5d 5d 29 29 20 7b 0a 0a 20 20 | set($delimiter[$code[0]])).{.... |
eea0 | 20 20 20 20 20 20 20 20 20 20 24 69 20 3d 20 31 3b 0a 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 | ..........$i.=.1;..........}.els |
eec0 | 65 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 24 69 20 3d 20 30 3b 20 24 69 | e.{..............for.($i.=.0;.$i |
eee0 | 20 3c 20 24 6c 65 6e 3b 20 2b 2b 24 69 29 20 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .<.$len;.++$i).{................ |
ef00 | 20 20 24 63 68 61 72 20 3d 20 24 63 6f 64 65 5b 24 69 5d 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 | ..$char.=.$code[$i];............ |
ef20 | 20 20 20 20 20 20 69 66 20 28 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ......if.(...................... |
ef40 | 20 20 20 28 27 22 27 20 3d 3d 20 24 63 68 61 72 20 7c 7c 20 22 27 22 20 3d 3d 20 24 63 68 61 72 | ...('"'.==.$char.||."'".==.$char |
ef60 | 29 20 26 26 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 24 63 | ).&&.........................($c |
ef80 | 68 61 72 20 3d 3d 20 24 65 6e 63 6c 6f 73 65 64 5f 62 79 20 7c 7c 20 27 27 20 3d 3d 20 24 65 6e | har.==.$enclosed_by.||.''.==.$en |
efa0 | 63 6c 6f 73 65 64 5f 62 79 29 20 26 26 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | closed_by).&&................... |
efc0 | 20 20 20 20 20 20 28 30 20 3d 3d 20 24 69 20 7c 7c 20 28 24 69 20 3e 20 30 20 26 26 20 27 5c 5c | ......(0.==.$i.||.($i.>.0.&&.'\\ |
efe0 | 27 20 21 3d 20 24 63 6f 64 65 5b 24 69 20 2d 20 31 5d 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 | '.!=.$code[$i.-.1]))............ |
f000 | 20 20 20 20 20 20 20 20 20 29 7b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .........){..................... |
f020 | 20 69 66 20 28 21 24 65 6e 63 6c 6f 73 65 64 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | .if.(!$enclosed).{.............. |
f040 | 20 20 20 20 20 20 20 20 20 20 20 24 65 6e 63 6c 6f 73 65 64 5f 62 79 20 3d 20 24 63 68 61 72 3b | ...........$enclosed_by.=.$char; |
f060 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 | .....................}.else.{... |
f080 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 65 6e 63 6c 6f 73 65 64 5f | ......................$enclosed_ |
f0a0 | 62 79 20 3d 20 22 22 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 | by.=."";.....................}.. |
f0c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 65 6e 63 6c 6f 73 65 64 20 3d 20 21 | ...................$enclosed.=.! |
f0e0 | 24 65 6e 63 6c 6f 73 65 64 3b 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 | $enclosed;..................}... |
f100 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 21 24 65 6e 63 6c 6f 73 65 64 20 26 26 20 | ..............if.(!$enclosed.&&. |
f120 | 69 73 73 65 74 28 24 64 65 6c 69 6d 69 74 65 72 5b 24 63 68 61 72 5d 29 29 20 7b 0a 20 20 20 20 | isset($delimiter[$char])).{..... |
f140 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 72 65 61 6b 3b 0a 20 20 20 20 20 20 20 20 20 | ................break;.......... |
f160 | 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 | .......}.............}.......... |
f180 | 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 73 75 62 73 74 72 28 24 63 6f 64 65 2c 20 | }..........return.substr($code,. |
f1a0 | 30 2c 20 24 69 29 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 67 65 74 56 61 6c | 0,.$i);.....}.//.end.func.getVal |
f1c0 | 75 65 0a 0a 0a 20 20 20 20 2f 2a 2a 0a 20 20 20 20 2a 20 44 65 6c 65 74 65 73 20 6f 6e 65 20 6f | ue......./**.....*.Deletes.one.o |
f1e0 | 72 20 6d 61 6e 79 20 76 61 72 69 61 62 6c 65 73 20 66 72 6f 6d 20 74 68 65 20 62 6c 6f 63 6b 20 | r.many.variables.from.the.block. |
f200 | 76 61 72 69 61 62 6c 65 20 6c 69 73 74 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 | variable.list......*.....*.@para |
f220 | 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 42 6c 6f 63 6b 6e 61 6d 65 0a 20 20 20 20 2a 20 40 | m....string....Blockname.....*.@ |
f240 | 70 61 72 61 6d 20 20 20 20 6d 69 78 65 64 20 20 20 20 20 4e 61 6d 65 20 6f 66 20 6f 6e 65 20 76 | param....mixed.....Name.of.one.v |
f260 | 61 72 69 61 62 6c 65 20 6f 72 20 61 72 72 61 79 20 6f 66 20 76 61 72 69 61 62 6c 65 73 0a 20 20 | ariable.or.array.of.variables... |
f280 | 20 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 20 61 72 72 61 79 20 | ..*.....................(.array. |
f2a0 | 28 20 6e 61 6d 65 20 3d 3e 20 74 72 75 65 20 29 20 29 20 74 6f 20 62 65 20 73 74 72 69 70 70 65 | (.name.=>.true.).).to.be.strippe |
f2c0 | 64 2e 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 64 65 6c 65 74 65 46 72 6f | d......*/.....function.deleteFro |
f2e0 | 6d 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 28 24 62 6c 6f 63 6b 2c 20 24 76 61 72 69 | mBlockvariablelist($block,.$vari |
f300 | 61 62 6c 65 73 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 69 73 5f 61 72 72 | ables).....{.........if.(!is_arr |
f320 | 61 79 28 24 76 61 72 69 61 62 6c 65 73 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 76 | ay($variables)).{.............$v |
f340 | 61 72 69 61 62 6c 65 73 20 3d 20 61 72 72 61 79 28 24 76 61 72 69 61 62 6c 65 73 20 3d 3e 20 74 | ariables.=.array($variables.=>.t |
f360 | 72 75 65 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 20 20 72 65 73 65 74 28 24 | rue);.........}..........reset($ |
f380 | 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 29 3b 0a 20 | this->blockvariables[$block]);.. |
f3a0 | 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 69 73 74 28 24 76 61 72 6e 61 6d 65 2c 20 24 76 61 | .......while.(list($varname,.$va |
f3c0 | 6c 29 20 3d 20 65 61 63 68 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b | l).=.each($this->blockvariables[ |
f3e0 | 24 62 6c 6f 63 6b 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 73 65 | $block])).{.............if.(isse |
f400 | 74 28 24 76 61 72 69 61 62 6c 65 73 5b 24 76 61 72 6e 61 6d 65 5d 29 29 20 7b 0a 20 20 20 20 20 | t($variables[$varname])).{...... |
f420 | 20 20 20 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 | ...........unset($this->blockvar |
f440 | 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 5b 24 76 61 72 6e 61 6d 65 5d 29 3b 0a 20 20 20 20 20 | iables[$block][$varname]);...... |
f460 | 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 | .......}.........}.....}.//.end. |
f480 | 64 65 6c 65 74 65 46 72 6f 6d 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 0a 0a 20 20 20 | deleteFromBlockvariablelist..... |
f4a0 | 20 2f 2a 2a 0a 20 20 20 20 2a 20 55 70 64 61 74 65 73 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 | ./**.....*.Updates.the.variable. |
f4c0 | 6c 69 73 74 20 6f 66 20 61 20 62 6c 6f 63 6b 2e 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 | list.of.a.block......*.....*.@pa |
f4e0 | 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 42 6c 6f 63 6b 6e 61 6d 65 0a 20 20 20 20 2a | ram....string....Blockname.....* |
f500 | 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 75 70 64 61 74 65 42 6c 6f 63 6b 76 61 72 69 61 62 | /.....function.updateBlockvariab |
f520 | 6c 65 6c 69 73 74 28 24 62 6c 6f 63 6b 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 70 72 65 | lelist($block).....{.........pre |
f540 | 67 5f 6d 61 74 63 68 5f 61 6c 6c 28 20 24 74 68 69 73 2d 3e 76 61 72 69 61 62 6c 65 73 52 65 67 | g_match_all(.$this->variablesReg |
f560 | 45 78 70 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 | Exp,.........................$th |
f580 | 69 73 2d 3e 62 6c 6f 63 6b 6c 69 73 74 5b 24 62 6c 6f 63 6b 5d 2c 20 24 72 65 67 73 0a 20 20 20 | is->blocklist[$block],.$regs.... |
f5a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 | .................);..........if. |
f5c0 | 28 30 20 21 3d 20 63 6f 75 6e 74 28 24 72 65 67 73 5b 31 5d 29 29 20 7b 0a 20 20 20 20 20 20 20 | (0.!=.count($regs[1])).{........ |
f5e0 | 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 72 65 67 73 5b 31 5d 20 61 73 20 24 6b 20 3d 3e 20 | .....foreach.($regs[1].as.$k.=>. |
f600 | 24 76 61 72 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 | $var).{.................$this->b |
f620 | 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 5b 24 76 61 72 5d 20 3d 20 74 72 | lockvariables[$block][$var].=.tr |
f640 | 75 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 | ue;.............}.........}.else |
f660 | 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 | .{.............$this->blockvaria |
f680 | 62 6c 65 73 5b 24 62 6c 6f 63 6b 5d 20 3d 20 61 72 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 | bles[$block].=.array();......... |
f6a0 | 7d 0a 0a 20 20 20 20 20 20 20 20 2f 2f 20 63 68 65 63 6b 20 69 66 20 61 6e 79 20 69 6e 6e 65 72 | }..........//.check.if.any.inner |
f6c0 | 20 62 6c 6f 63 6b 73 20 77 65 72 65 20 66 6f 75 6e 64 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 | .blocks.were.found.........if.(i |
f6e0 | 73 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 5d 29 20 | sset($this->blockinner[$block]). |
f700 | 26 26 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 73 5f 61 72 72 61 79 28 24 74 68 69 73 2d 3e 62 | &&.............is_array($this->b |
f720 | 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b 5d 29 20 26 26 0a 20 20 20 20 20 20 20 20 20 20 | lockinner[$block]).&&........... |
f740 | 20 20 63 6f 75 6e 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 62 6c 6f 63 6b | ..count($this->blockinner[$block |
f760 | 5d 29 20 3e 20 30 0a 20 20 20 20 20 20 20 20 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ]).>.0.........).{............./ |
f780 | 2a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 20 6c 6f 6f 70 20 74 68 72 6f 75 67 68 20 69 6e | *..............*.loop.through.in |
f7a0 | 6e 65 72 20 62 6c 6f 63 6b 73 2c 20 72 65 67 69 73 74 65 72 69 6e 67 20 74 68 65 20 76 61 72 69 | ner.blocks,.registering.the.vari |
f7c0 | 61 62 6c 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 20 70 6c 61 63 65 68 6f 6c 64 65 72 73 | able..............*.placeholders |
f7e0 | 20 69 6e 20 65 61 63 68 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 2f 0a 20 20 20 20 20 20 20 | .in.each..............*/........ |
f800 | 20 20 20 20 20 66 6f 72 65 61 63 68 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 69 6e 6e 65 72 5b 24 | .....foreach($this->blockinner[$ |
f820 | 62 6c 6f 63 6b 5d 20 61 73 20 24 63 68 69 6c 64 42 6c 6f 63 6b 29 20 7b 0a 20 20 20 20 20 20 20 | block].as.$childBlock).{........ |
f840 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 75 70 64 61 74 65 42 6c 6f 63 6b 76 61 72 69 61 | .........$this->updateBlockvaria |
f860 | 62 6c 65 6c 69 73 74 28 24 63 68 69 6c 64 42 6c 6f 63 6b 29 3b 0a 20 20 20 20 20 20 20 20 20 20 | blelist($childBlock);........... |
f880 | 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 | ..}.........}......}.//.end.func |
f8a0 | 20 75 70 64 61 74 65 42 6c 6f 63 6b 76 61 72 69 61 62 6c 65 6c 69 73 74 0a 0a 20 20 20 20 2f 2a | .updateBlockvariablelist....../* |
f8c0 | 2a 0a 20 20 20 20 2a 20 52 65 74 75 72 6e 73 20 61 6e 20 61 72 72 61 79 20 6f 66 20 62 6c 6f 63 | *.....*.Returns.an.array.of.bloc |
f8e0 | 6b 6e 61 6d 65 73 20 77 68 65 72 65 20 74 68 65 20 67 69 76 65 6e 20 76 61 72 69 61 62 6c 65 0a | knames.where.the.given.variable. |
f900 | 20 20 20 20 2a 20 70 6c 61 63 65 68 6f 6c 64 65 72 20 69 73 20 75 73 65 64 2e 0a 20 20 20 20 2a | ....*.placeholder.is.used......* |
f920 | 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 56 61 72 69 61 | .....*.@param....string....Varia |
f940 | 62 6c 65 20 70 6c 61 63 65 68 6f 6c 64 65 72 0a 20 20 20 20 2a 20 40 72 65 74 75 72 6e 20 20 20 | ble.placeholder.....*.@return... |
f960 | 20 61 72 72 61 79 20 20 20 20 24 70 61 72 65 6e 74 73 20 20 20 20 70 61 72 65 6e 74 73 5b 30 2e | .array....$parents....parents[0. |
f980 | 2e 6e 5d 20 3d 20 62 6c 6f 63 6b 6e 61 6d 65 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 | .n].=.blockname.....*/.....funct |
f9a0 | 69 6f 6e 20 66 69 6e 64 50 6c 61 63 65 68 6f 6c 64 65 72 42 6c 6f 63 6b 73 28 24 76 61 72 69 61 | ion.findPlaceholderBlocks($varia |
f9c0 | 62 6c 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 70 61 72 65 6e 74 73 20 3d 20 61 72 | ble).....{.........$parents.=.ar |
f9e0 | 72 61 79 28 29 3b 0a 20 20 20 20 20 20 20 20 72 65 73 65 74 28 24 74 68 69 73 2d 3e 62 6c 6f 63 | ray();.........reset($this->bloc |
fa00 | 6b 6c 69 73 74 29 3b 0a 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 6c 69 73 74 28 24 62 6c 6f | klist);.........while.(list($blo |
fa20 | 63 6b 6e 61 6d 65 2c 20 24 63 6f 6e 74 65 6e 74 29 20 3d 20 65 61 63 68 28 24 74 68 69 73 2d 3e | ckname,.$content).=.each($this-> |
fa40 | 62 6c 6f 63 6b 6c 69 73 74 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 73 65 74 28 | blocklist)).{.............reset( |
fa60 | 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b 6e 61 6d 65 | $this->blockvariables[$blockname |
fa80 | 5d 29 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 77 68 69 6c 65 20 28 0a 20 20 20 20 20 20 20 20 | ]);.............while.(......... |
faa0 | 20 20 20 20 20 20 20 20 6c 69 73 74 28 24 76 61 72 6e 61 6d 65 2c 20 24 76 61 6c 29 20 3d 20 65 | ........list($varname,.$val).=.e |
fac0 | 61 63 68 28 24 74 68 69 73 2d 3e 62 6c 6f 63 6b 76 61 72 69 61 62 6c 65 73 5b 24 62 6c 6f 63 6b | ach($this->blockvariables[$block |
fae0 | 6e 61 6d 65 5d 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 | name])).............{........... |
fb00 | 20 20 20 20 20 20 69 66 20 28 24 76 61 72 69 61 62 6c 65 20 3d 3d 20 24 76 61 72 6e 61 6d 65 29 | ......if.($variable.==.$varname) |
fb20 | 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 70 61 72 65 6e 74 73 5b | .{.....................$parents[ |
fb40 | 5d 20 3d 20 24 62 6c 6f 63 6b 6e 61 6d 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ].=.$blockname;................. |
fb60 | 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 | }.............}.........}....... |
fb80 | 20 20 20 72 65 74 75 72 6e 20 24 70 61 72 65 6e 74 73 3b 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 | ...return.$parents;.....}.//.end |
fba0 | 20 66 75 6e 63 20 66 69 6e 64 50 6c 61 63 65 68 6f 6c 64 65 72 42 6c 6f 63 6b 73 0a 0a 20 20 20 | .func.findPlaceholderBlocks..... |
fbc0 | 20 2f 2a 2a 0a 20 20 20 20 2a 20 48 61 6e 64 6c 65 73 20 77 61 72 6e 69 6e 67 73 2c 20 73 61 76 | ./**.....*.Handles.warnings,.sav |
fbe0 | 65 73 20 74 68 65 6d 20 74 6f 20 24 77 61 72 6e 20 61 6e 64 20 70 72 69 6e 74 73 20 74 68 65 6d | es.them.to.$warn.and.prints.them |
fc00 | 20 6f 72 0a 20 20 20 20 2a 20 63 61 6c 6c 73 20 64 69 65 28 29 20 64 65 70 65 6e 64 69 6e 67 20 | .or.....*.calls.die().depending. |
fc20 | 6f 6e 20 74 68 65 20 66 6c 61 67 73 0a 20 20 20 20 2a 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 | on.the.flags.....*.....*.@param. |
fc40 | 20 20 20 73 74 72 69 6e 67 20 20 20 20 57 61 72 6e 69 6e 67 0a 20 20 20 20 2a 20 40 70 61 72 61 | ...string....Warning.....*.@para |
fc60 | 6d 20 20 20 20 73 74 72 69 6e 67 20 20 20 20 46 69 6c 65 20 77 68 65 72 65 20 74 68 65 20 77 61 | m....string....File.where.the.wa |
fc80 | 72 6e 69 6e 67 20 6f 63 63 75 72 65 64 0a 20 20 20 20 2a 20 40 70 61 72 61 6d 20 20 20 20 69 6e | rning.occured.....*.@param....in |
fca0 | 74 20 20 20 20 20 20 20 4c 69 6e 65 6e 75 6d 62 65 72 20 77 68 65 72 65 20 74 68 65 20 77 61 72 | t.......Linenumber.where.the.war |
fcc0 | 6e 69 6e 67 20 6f 63 63 75 72 65 64 0a 20 20 20 20 2a 20 40 73 65 65 20 20 20 20 20 20 24 77 61 | ning.occured.....*.@see......$wa |
fce0 | 72 6e 2c 20 24 70 72 69 6e 74 57 61 72 6e 69 6e 67 2c 20 24 68 61 6c 74 4f 6e 57 61 72 6e 69 6e | rn,.$printWarning,.$haltOnWarnin |
fd00 | 67 0a 20 20 20 20 2a 2f 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 77 61 72 6e 69 6e 67 28 24 6d | g.....*/.....function.warning($m |
fd20 | 65 73 73 61 67 65 2c 20 24 66 69 6c 65 20 3d 20 27 27 2c 20 24 6c 69 6e 65 20 3d 20 30 29 0a 20 | essage,.$file.=.'',.$line.=.0).. |
fd40 | 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 6d 65 73 73 61 67 65 20 3d 20 73 70 72 69 6e 74 66 28 | ...{.........$message.=.sprintf( |
fd60 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 48 54 4d 4c 5f 54 65 6d 70 6c | .....................'HTML_Templ |
fd80 | 61 74 65 5f 49 54 58 20 57 61 72 6e 69 6e 67 3a 20 25 73 20 5b 46 69 6c 65 3a 20 25 73 2c 20 4c | ate_ITX.Warning:.%s.[File:.%s,.L |
fda0 | 69 6e 65 3a 20 25 64 5d 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 | ine:.%d]',.....................$ |
fdc0 | 6d 65 73 73 61 67 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 66 69 | message,.....................$fi |
fde0 | 6c 65 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 6c 69 6e 65 0a 20 20 | le,.....................$line... |
fe00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | ..............);..........$this- |
fe20 | 3e 77 61 72 6e 5b 5d 20 3d 20 24 6d 65 73 73 61 67 65 3b 0a 0a 20 20 20 20 20 20 20 20 69 66 20 | >warn[].=.$message;..........if. |
fe40 | 28 24 74 68 69 73 2d 3e 70 72 69 6e 74 57 61 72 6e 69 6e 67 29 20 7b 0a 20 20 20 20 20 20 20 20 | ($this->printWarning).{......... |
fe60 | 20 20 20 20 70 72 69 6e 74 20 24 6d 65 73 73 61 67 65 3b 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 | ....print.$message;.........}... |
fe80 | 20 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 68 61 6c 74 4f 6e 45 72 72 6f 72 29 20 7b | .......if.($this->haltOnError).{ |
fea0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 64 69 65 28 24 6d 65 73 73 61 67 65 29 3b 0a 20 20 20 20 | .............die($message);..... |
fec0 | 20 20 20 20 7d 0a 20 20 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 77 61 72 6e 69 6e 67 0a | ....}.....}.//.end.func.warning. |
fee0 | 0a 7d 20 2f 2f 20 65 6e 64 20 63 6c 61 73 73 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 | .}.//.end.class.HTML_Template_IT |
ff00 | 58 0a 3f 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | X.?>............................ |
ff20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ff40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ff60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ff80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ffa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ffc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ffe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10000 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 49 54 5f 45 72 72 6f 72 2e 70 68 | HTML_Template_IT-1.1/IT_Error.ph |
10020 | 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | p............................... |
10040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10060 | 00 00 00 00 31 30 30 36 36 34 20 00 20 20 20 37 36 34 20 00 20 20 20 31 34 34 20 00 20 20 20 20 | ....100664.....764.....144...... |
10080 | 20 20 20 33 34 36 37 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 31 37 32 34 20 00 00 00 00 00 | ...3467..7633514211..11724...... |
100a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
101a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
101c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
101e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10200 | 3c 3f 70 68 70 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | <?php.//.+---------------------- |
10220 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
10240 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 20 7c 20 50 48 50 20 56 65 72 73 69 | ----------------+.//.|.PHP.Versi |
10260 | 6f 6e 20 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | on.4............................ |
10280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f | ............................|.// |
102a0 | 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | .+------------------------------ |
102c0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
102e0 | 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 20 7c 20 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 31 39 39 | --------+.//.|.Copyright.(c).199 |
10300 | 37 2c 20 31 39 39 38 2c 20 31 39 39 39 2c 20 32 30 30 30 2c 20 32 30 30 31 20 54 68 65 20 50 48 | 7,.1998,.1999,.2000,.2001.The.PH |
10320 | 50 20 47 72 6f 75 70 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d | P.Group.............|.//.+------ |
10340 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
10360 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
10380 | 2b 0a 2f 2f 20 7c 20 54 68 69 73 20 73 6f 75 72 63 65 20 66 69 6c 65 20 69 73 20 73 75 62 6a 65 | +.//.|.This.source.file.is.subje |
103a0 | 63 74 20 74 6f 20 76 65 72 73 69 6f 6e 20 32 2e 30 20 6f 66 20 74 68 65 20 50 48 50 20 6c 69 63 | ct.to.version.2.0.of.the.PHP.lic |
103c0 | 65 6e 73 65 2c 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 74 68 61 74 20 69 73 20 62 75 6e 64 6c | ense,.......|.//.|.that.is.bundl |
103e0 | 65 64 20 77 69 74 68 20 74 68 69 73 20 70 61 63 6b 61 67 65 20 69 6e 20 74 68 65 20 66 69 6c 65 | ed.with.this.package.in.the.file |
10400 | 20 4c 49 43 45 4e 53 45 2c 20 61 6e 64 20 69 73 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 61 | .LICENSE,.and.is........|.//.|.a |
10420 | 76 61 69 6c 61 62 6c 65 20 61 74 20 74 68 72 6f 75 67 68 20 74 68 65 20 77 6f 72 6c 64 2d 77 69 | vailable.at.through.the.world-wi |
10440 | 64 65 2d 77 65 62 20 61 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | de-web.at....................... |
10460 | 20 20 20 20 7c 0a 2f 2f 20 7c 20 68 74 74 70 3a 2f 2f 77 77 77 2e 70 68 70 2e 6e 65 74 2f 6c 69 | ....|.//.|.http://www.php.net/li |
10480 | 63 65 6e 73 65 2f 32 5f 30 32 2e 74 78 74 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | cense/2_02.txt.................. |
104a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 49 66 20 79 6f 75 20 64 69 | ................|.//.|.If.you.di |
104c0 | 64 20 6e 6f 74 20 72 65 63 65 69 76 65 20 61 20 63 6f 70 79 20 6f 66 20 74 68 65 20 50 48 50 20 | d.not.receive.a.copy.of.the.PHP. |
104e0 | 6c 69 63 65 6e 73 65 20 61 6e 64 20 61 72 65 20 75 6e 61 62 6c 65 20 74 6f 20 20 20 7c 0a 2f 2f | license.and.are.unable.to...|.// |
10500 | 20 7c 20 6f 62 74 61 69 6e 20 69 74 20 74 68 72 6f 75 67 68 20 74 68 65 20 77 6f 72 6c 64 2d 77 | .|.obtain.it.through.the.world-w |
10520 | 69 64 65 2d 77 65 62 2c 20 70 6c 65 61 73 65 20 73 65 6e 64 20 61 20 6e 6f 74 65 20 74 6f 20 20 | ide-web,.please.send.a.note.to.. |
10540 | 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 7c 20 6c 69 63 65 6e 73 65 40 70 68 70 2e 6e 65 74 20 73 | ........|.//.|.license@php.net.s |
10560 | 6f 20 77 65 20 63 61 6e 20 6d 61 69 6c 20 79 6f 75 20 61 20 63 6f 70 79 20 69 6d 6d 65 64 69 61 | o.we.can.mail.you.a.copy.immedia |
10580 | 74 65 6c 79 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d | tely................|.//.+------ |
105a0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
105c0 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
105e0 | 2b 0a 2f 2f 20 7c 20 41 75 74 68 6f 72 3a 20 55 6c 66 20 57 65 6e 64 65 6c 20 3c 75 6c 66 2e 77 | +.//.|.Author:.Ulf.Wendel.<ulf.w |
10600 | 65 6e 64 65 6c 40 70 68 70 64 6f 63 2e 64 65 3e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | endel@phpdoc.de>................ |
10620 | 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 2f 2f 20 2b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ............|.//.+-------------- |
10640 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | -------------------------------- |
10660 | 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2b 0a 2f 2f 0a 2f 2f 20 | ------------------------+.//.//. |
10680 | 24 49 64 3a 20 49 54 5f 45 72 72 6f 72 2e 70 68 70 2c 76 20 31 2e 31 20 32 30 30 32 2f 30 34 2f | $Id:.IT_Error.php,v.1.1.2002/04/ |
106a0 | 32 38 20 30 37 3a 31 36 3a 30 35 20 73 65 62 61 73 74 69 61 6e 20 45 78 70 20 24 0a 0a 72 65 71 | 28.07:16:05.sebastian.Exp.$..req |
106c0 | 75 69 72 65 5f 6f 6e 63 65 20 22 50 45 41 52 2e 70 68 70 22 3b 0a 0a 2f 2a 2a 0a 2a 20 49 54 5b | uire_once."PEAR.php";../**.*.IT[ |
106e0 | 58 5d 20 45 72 72 6f 72 20 63 6c 61 73 73 0a 2a 20 0a 2a 20 40 70 61 63 6b 61 67 65 20 49 54 5b | X].Error.class.*..*.@package.IT[ |
10700 | 58 5d 0a 2a 2f 0a 63 6c 61 73 73 20 49 54 5f 45 72 72 6f 72 20 65 78 74 65 6e 64 73 20 50 45 41 | X].*/.class.IT_Error.extends.PEA |
10720 | 52 5f 45 72 72 6f 72 20 7b 0a 0a 0a 20 20 2f 2a 2a 0a 20 20 2a 20 50 72 65 66 69 78 20 6f 66 20 | R_Error.{...../**...*.Prefix.of. |
10740 | 61 6c 6c 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 73 2e 0a 20 20 2a 20 0a 20 20 2a 20 40 76 61 | all.error.messages....*....*.@va |
10760 | 72 20 20 73 74 72 69 6e 67 0a 20 20 2a 2f 0a 20 20 76 61 72 20 24 65 72 72 6f 72 5f 6d 65 73 73 | r..string...*/...var.$error_mess |
10780 | 61 67 65 5f 70 72 65 66 69 78 20 3d 20 22 49 6e 74 65 67 72 61 74 65 64 54 65 6d 70 6c 61 74 65 | age_prefix.=."IntegratedTemplate |
107a0 | 20 45 72 72 6f 72 3a 20 22 3b 0a 20 20 0a 20 20 2f 2a 2a 0a 20 20 2a 20 43 72 65 61 74 65 73 20 | .Error:.";....../**...*.Creates. |
107c0 | 61 6e 20 63 61 63 68 65 20 65 72 72 6f 72 20 6f 62 6a 65 63 74 2e 0a 20 20 2a 20 0a 20 20 2a 20 | an.cache.error.object....*....*. |
107e0 | 40 70 61 72 61 6d 20 20 73 74 72 69 6e 67 20 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 0a 20 20 | @param..string..error.message... |
10800 | 2a 20 40 70 61 72 61 6d 20 20 73 74 72 69 6e 67 20 20 66 69 6c 65 20 77 68 65 72 65 20 74 68 65 | *.@param..string..file.where.the |
10820 | 20 65 72 72 6f 72 20 6f 63 63 75 72 65 64 0a 20 20 2a 20 40 70 61 72 61 6d 20 20 73 74 72 69 6e | .error.occured...*.@param..strin |
10840 | 67 20 20 6c 69 6e 65 6e 75 6d 62 65 72 20 77 68 65 72 65 20 74 68 65 20 65 72 72 6f 72 20 6f 63 | g..linenumber.where.the.error.oc |
10860 | 63 75 72 65 64 0a 20 20 2a 2f 0a 20 20 66 75 6e 63 74 69 6f 6e 20 49 54 5f 45 72 72 6f 72 28 24 | cured...*/...function.IT_Error($ |
10880 | 6d 73 67 2c 20 24 66 69 6c 65 20 3d 20 5f 5f 46 49 4c 45 5f 5f 2c 20 24 6c 69 6e 65 20 3d 20 5f | msg,.$file.=.__FILE__,.$line.=._ |
108a0 | 5f 4c 49 4e 45 5f 5f 29 20 7b 0a 20 20 20 20 0a 20 20 20 20 24 74 68 69 73 2d 3e 50 45 41 52 5f | _LINE__).{..........$this->PEAR_ |
108c0 | 45 72 72 6f 72 28 73 70 72 69 6e 74 66 28 22 25 73 20 5b 25 73 20 6f 6e 20 6c 69 6e 65 20 25 64 | Error(sprintf("%s.[%s.on.line.%d |
108e0 | 5d 2e 22 2c 20 24 6d 73 67 2c 20 24 66 69 6c 65 2c 20 24 6c 69 6e 65 29 29 3b 0a 20 20 20 20 0a | ].",.$msg,.$file,.$line));...... |
10900 | 20 20 7d 20 2f 2f 20 65 6e 64 20 66 75 6e 63 20 49 54 5f 45 72 72 6f 72 0a 20 20 0a 7d 20 2f 2f | ..}.//.end.func.IT_Error....}.// |
10920 | 20 65 6e 64 20 63 6c 61 73 73 20 49 54 5f 45 72 72 6f 72 0a 3f 3e 0a 00 00 00 00 00 00 00 00 00 | .end.class.IT_Error.?>.......... |
10940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
109a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
109c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
109e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
10a20 | 61 74 65 73 2f 61 64 64 62 6c 6f 63 6b 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ates/addblock.html.............. |
10a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
10a80 | 20 20 20 20 20 32 31 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 32 31 31 20 00 00 00 00 00 | .....21..7633514211..15211...... |
10aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c00 | 61 64 64 65 64 3a 7b 6e 65 77 5f 76 61 72 7d 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | added:{new_var}................. |
10c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
10e20 | 61 74 65 73 2f 62 6c 6f 63 6b 69 74 65 72 61 74 69 6f 6e 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 | ates/blockiteration.html........ |
10e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
10e80 | 20 20 20 20 32 31 34 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 36 35 30 33 20 00 00 00 00 00 | ....214..7633514211..16503...... |
10ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11000 | 3c 21 2d 2d 20 42 45 47 49 4e 20 6f 75 74 65 72 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d 0a 7b 6f 75 74 | <!--.BEGIN.outer_block.-->..{out |
11020 | 65 72 7d 0d 0a 20 20 20 20 3c 21 2d 2d 20 42 45 47 49 4e 20 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 | er}......<!--.BEGIN.inner_block. |
11040 | 2d 2d 3e 0d 0a 20 20 20 20 7c 7b 69 6e 6e 65 72 7d 0d 0a 20 20 20 20 3c 21 2d 2d 20 45 4e 44 20 | -->......|{inner}......<!--.END. |
11060 | 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d 0a 23 0d 0a 3c 21 2d 2d 20 45 4e 44 20 6f 75 74 | inner_block.-->..#..<!--.END.out |
11080 | 65 72 5f 62 6c 6f 63 6b 20 2d 2d 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | er_block.-->.................... |
110a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
110c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
110e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
111a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
111c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
111e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11200 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
11220 | 61 74 65 73 2f 62 6c 6f 63 6b 73 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ates/blocks.html................ |
11240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11260 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
11280 | 20 20 20 20 32 34 37 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 34 37 35 35 20 00 00 00 00 00 | ....247..7633514211..14755...... |
112a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
112c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
112e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
113a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
113c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
113e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11400 | 7b 76 61 72 7d 0d 0a 3c 21 2d 2d 20 42 45 47 49 4e 20 6f 6c 64 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d | {var}..<!--.BEGIN.old_block.-->. |
11420 | 0a 6f 6c 64 3a 7b 6f 6c 64 5f 76 61 72 7d 0d 0a 20 20 20 20 3c 21 2d 2d 20 42 45 47 49 4e 20 6f | .old:{old_var}......<!--.BEGIN.o |
11440 | 6c 64 5f 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d 0a 20 20 20 20 7c 7b 6f 6c 64 5f 69 6e | ld_inner_block.-->......|{old_in |
11460 | 6e 65 72 5f 76 61 72 7d 0d 0a 20 20 20 20 3c 21 2d 2d 20 45 4e 44 20 6f 6c 64 5f 69 6e 6e 65 72 | ner_var}......<!--.END.old_inner |
11480 | 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d 0a 23 0d 0a 3c 21 2d 2d 20 45 4e 44 20 6f 6c 64 5f 62 6c 6f 63 | _block.-->..#..<!--.END.old_bloc |
114a0 | 6b 20 2d 2d 3e 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | k.-->........................... |
114c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
114e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
115a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
115c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
115e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11600 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
11620 | 61 74 65 73 2f 67 6c 6f 62 61 6c 73 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ates/globals.html............... |
11640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11660 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
11680 | 20 20 20 20 34 33 34 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 31 32 31 20 00 00 00 00 00 | ....434..7633514211..15121...... |
116a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
117a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
117c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
117e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11800 | 3c 21 2d 2d 20 42 45 47 49 4e 20 62 6c 6f 63 6b 5f 6f 6e 65 20 2d 2d 3e 0d 0a 7b 67 6c 6f 62 7d | <!--.BEGIN.block_one.-->..{glob} |
11820 | 3a 7b 76 61 72 31 7d 23 0d 0a 3c 21 2d 2d 20 45 4e 44 20 62 6c 6f 63 6b 5f 6f 6e 65 20 2d 2d 3e | :{var1}#..<!--.END.block_one.--> |
11840 | 0d 0a 3c 21 2d 2d 20 42 45 47 49 4e 20 62 6c 6f 63 6b 5f 74 77 6f 20 2d 2d 3e 0d 0a 7b 67 6c 6f | ..<!--.BEGIN.block_two.-->..{glo |
11860 | 62 7d 3a 7b 76 61 72 32 7d 23 0d 0a 3c 21 2d 2d 20 45 4e 44 20 62 6c 6f 63 6b 5f 74 77 6f 20 2d | b}:{var2}#..<!--.END.block_two.- |
11880 | 2d 3e 0d 0a 3c 21 2d 2d 20 42 45 47 49 4e 20 62 6c 6f 63 6b 5f 74 68 72 65 65 20 2d 2d 3e 0d 0a | ->..<!--.BEGIN.block_three.-->.. |
118a0 | 7b 67 6c 6f 62 7d 3a 7b 76 61 72 33 7d 0d 0a 20 20 20 20 3c 21 2d 2d 20 42 45 47 49 4e 20 62 6c | {glob}:{var3}......<!--.BEGIN.bl |
118c0 | 6f 63 6b 5f 66 6f 75 72 20 2d 2d 3e 0d 0a 20 20 20 20 7c 7b 67 6c 6f 62 7d 3a 7b 76 61 72 34 7d | ock_four.-->......|{glob}:{var4} |
118e0 | 0d 0a 20 20 20 20 3c 21 2d 2d 20 45 4e 44 20 62 6c 6f 63 6b 5f 66 6f 75 72 20 2d 2d 3e 0d 0a 23 | ......<!--.END.block_four.-->..# |
11900 | 0d 0a 3c 21 2d 2d 20 45 4e 44 20 62 6c 6f 63 6b 5f 74 68 72 65 65 20 2d 2d 3e 0d 0a 00 00 00 00 | ..<!--.END.block_three.-->...... |
11920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
119a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
119c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
119e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
11a20 | 61 74 65 73 2f 5f 5f 69 6e 63 6c 75 64 65 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 | ates/__include.html............. |
11a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
11a80 | 20 20 20 20 20 31 37 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 33 37 34 20 00 00 00 00 00 | .....17..7633514211..15374...... |
11aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c00 | 49 6e 63 6c 75 64 65 64 20 66 69 6c 65 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | Included.file................... |
11c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
11e20 | 61 74 65 73 2f 69 6e 63 6c 75 64 65 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ates/include.html............... |
11e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
11e80 | 20 20 20 20 20 35 36 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 31 30 31 20 00 00 00 00 00 | .....56..7633514211..15101...... |
11ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12000 | 4d 61 73 74 65 72 20 66 69 6c 65 3b 20 3c 21 2d 2d 20 49 4e 43 4c 55 44 45 20 5f 5f 69 6e 63 6c | Master.file;.<!--.INCLUDE.__incl |
12020 | 75 64 65 2e 68 74 6d 6c 20 2d 2d 3e 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ude.html.-->.................... |
12040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
121a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
121c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
121e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12200 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
12220 | 61 74 65 73 2f 6c 6f 61 64 74 65 6d 70 6c 61 74 65 66 69 6c 65 2e 68 74 6d 6c 00 00 00 00 00 00 | ates/loadtemplatefile.html...... |
12240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12260 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
12280 | 20 20 20 20 20 31 34 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 36 37 36 33 20 00 00 00 00 00 | .....14..7633514211..16763...... |
122a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
123a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
123c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
123e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12400 | 41 20 74 65 6d 70 6c 61 74 65 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | A.template...................... |
12420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
125a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
125c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
125e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12600 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 6d 70 6c | HTML_Template_IT-1.1/tests/templ |
12620 | 61 74 65 73 2f 72 65 70 6c 61 63 65 62 6c 6f 63 6b 2e 68 74 6d 6c 00 00 00 00 00 00 00 00 00 00 | ates/replaceblock.html.......... |
12640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12660 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
12680 | 20 20 20 20 31 37 35 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 36 31 32 36 20 00 00 00 00 00 | ....175..7633514211..16126...... |
126a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
127a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
127c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
127e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12800 | 72 65 70 6c 61 63 65 64 3a 7b 72 65 70 6c 61 63 65 64 5f 76 61 72 7d 0d 0a 20 20 20 20 3c 21 2d | replaced:{replaced_var}......<!- |
12820 | 2d 20 42 45 47 49 4e 20 6e 65 77 5f 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d 0a 20 20 20 | -.BEGIN.new_inner_block.-->..... |
12840 | 20 7c 7b 72 65 70 6c 61 63 65 64 5f 69 6e 6e 65 72 5f 76 61 72 7d 0d 0a 20 20 20 20 3c 21 2d 2d | .|{replaced_inner_var}......<!-- |
12860 | 20 45 4e 44 20 6e 65 77 5f 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 2d 2d 3e 0d 0a 23 0d 0a 00 00 00 | .END.new_inner_block.-->..#..... |
12880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
129a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
129c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
129e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 43 6f 6e 73 6f | HTML_Template_IT-1.1/tests/Conso |
12a20 | 6c 65 5f 54 65 73 74 4c 69 73 74 65 6e 65 72 2e 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 | le_TestListener.php............. |
12a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
12a80 | 20 20 20 31 36 36 31 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 34 35 35 20 00 00 00 00 00 | ...1661..7633514211..15455...... |
12aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c00 | 3c 3f 70 68 70 0d 0a 63 6c 61 73 73 20 43 6f 6e 73 6f 6c 65 5f 54 65 73 74 4c 69 73 74 65 6e 65 | <?php..class.Console_TestListene |
12c20 | 72 20 65 78 74 65 6e 64 73 20 50 48 50 55 6e 69 74 5f 54 65 73 74 4c 69 73 74 65 6e 65 72 20 7b | r.extends.PHPUnit_TestListener.{ |
12c40 | 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 61 64 64 45 72 72 6f 72 28 26 24 74 65 73 74 2c 20 | ......function.addError(&$test,. |
12c60 | 26 24 74 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 5f 65 72 72 6f 72 73 20 2b | &$t).{..........$this->_errors.+ |
12c80 | 3d 20 31 3b 0d 0a 20 20 20 20 20 20 20 20 65 63 68 6f 20 22 20 45 72 72 6f 72 20 24 74 68 69 73 | =.1;..........echo.".Error.$this |
12ca0 | 2d 3e 5f 65 72 72 6f 72 73 20 69 6e 20 22 20 2e 20 24 74 65 73 74 2d 3e 67 65 74 4e 61 6d 65 28 | ->_errors.in."...$test->getName( |
12cc0 | 29 20 2e 20 22 20 3a 20 24 74 5c 6e 22 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e | )...".:.$t\n";......}........fun |
12ce0 | 63 74 69 6f 6e 20 61 64 64 46 61 69 6c 75 72 65 28 26 24 74 65 73 74 2c 20 26 24 74 29 20 7b 0d | ction.addFailure(&$test,.&$t).{. |
12d00 | 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 5f 66 61 69 6c 73 20 2b 3d 20 31 3b 0d 0a 20 20 | .........$this->_fails.+=.1;.... |
12d20 | 20 20 20 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 5f 66 61 69 6c 73 20 3d 3d 20 31 29 20 7b 0d | ......if.($this->_fails.==.1).{. |
12d40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 63 68 6f 20 22 5c 6e 22 3b 0d 0a 20 20 20 20 20 20 20 | .............echo."\n";......... |
12d60 | 20 7d 0d 0a 20 20 20 20 20 20 20 20 65 63 68 6f 20 22 46 61 69 6c 75 72 65 20 24 74 68 69 73 2d | .}..........echo."Failure.$this- |
12d80 | 3e 5f 66 61 69 6c 73 20 3a 20 24 74 5c 6e 22 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 | >_fails.:.$t\n";......}........f |
12da0 | 75 6e 63 74 69 6f 6e 20 65 6e 64 54 65 73 74 28 26 24 74 65 73 74 29 20 7b 0d 0a 20 20 20 20 20 | unction.endTest(&$test).{....... |
12dc0 | 20 20 20 69 66 20 28 24 74 68 69 73 2d 3e 5f 66 61 69 6c 73 20 3d 3d 20 30 20 26 26 20 24 74 68 | ...if.($this->_fails.==.0.&&.$th |
12de0 | 69 73 2d 3e 5f 65 72 72 6f 72 73 20 3d 3d 20 30 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | is->_errors.==.0).{............. |
12e00 | 20 65 63 68 6f 20 27 20 54 65 73 74 20 70 61 73 73 65 64 27 3b 0d 0a 20 20 20 20 20 20 20 20 7d | .echo.'.Test.passed';..........} |
12e20 | 20 65 6c 73 65 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 65 63 68 6f 20 22 54 68 65 72 65 | .else.{..............echo."There |
12e40 | 20 77 65 72 65 20 24 74 68 69 73 2d 3e 5f 66 61 69 6c 73 20 66 61 69 6c 75 72 65 73 20 66 6f 72 | .were.$this->_fails.failures.for |
12e60 | 20 22 20 2e 20 24 74 65 73 74 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 20 22 5c 6e 22 3b 0d 0a 20 | ."...$test->getName()..."\n";... |
12e80 | 20 20 20 20 20 20 20 20 20 20 20 65 63 68 6f 20 22 54 68 65 72 65 20 77 65 72 65 20 24 74 68 69 | ...........echo."There.were.$thi |
12ea0 | 73 2d 3e 5f 65 72 72 6f 72 73 20 65 72 72 6f 72 73 20 66 6f 72 20 22 20 2e 20 24 74 65 73 74 2d | s->_errors.errors.for."...$test- |
12ec0 | 3e 67 65 74 4e 61 6d 65 28 29 20 2e 20 22 5c 6e 22 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 | >getName()..."\n";..........}... |
12ee0 | 20 20 20 20 20 20 20 65 63 68 6f 20 22 5c 6e 22 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 | .......echo."\n";......}........ |
12f00 | 66 75 6e 63 74 69 6f 6e 20 73 74 61 72 74 54 65 73 74 28 26 24 74 65 73 74 29 20 7b 0d 0a 20 20 | function.startTest(&$test).{.... |
12f20 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 5f 66 61 69 6c 73 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 | ......$this->_fails.=.0;........ |
12f40 | 20 20 24 74 68 69 73 2d 3e 5f 65 72 72 6f 72 73 20 3d 20 30 3b 0d 0a 20 20 20 20 20 20 20 20 65 | ..$this->_errors.=.0;..........e |
12f60 | 63 68 6f 20 67 65 74 5f 63 6c 61 73 73 28 24 74 65 73 74 29 20 2e 20 22 20 3a 20 53 74 61 72 74 | cho.get_class($test)...".:.Start |
12f80 | 69 6e 67 20 22 20 2e 20 24 74 65 73 74 2d 3e 67 65 74 4e 61 6d 65 28 29 20 2e 20 20 22 20 2e 2e | ing."...$test->getName()...."... |
12fa0 | 2e 22 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 3f 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .";......}..}..?>............... |
12fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13000 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 49 54 5f 61 70 | HTML_Template_IT-1.1/tests/IT_ap |
13020 | 69 5f 74 65 73 74 63 61 73 65 2e 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | i_testcase.php.................. |
13040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13060 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
13080 | 20 20 31 35 31 36 37 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 34 34 33 34 20 00 00 00 00 00 | ..15167..7633514211..14434...... |
130a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
131a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
131c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
131e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13200 | 3c 3f 70 68 70 0d 0a 0d 0a 63 6c 61 73 73 20 49 54 5f 61 70 69 5f 54 65 73 74 43 61 73 65 20 65 | <?php....class.IT_api_TestCase.e |
13220 | 78 74 65 6e 64 73 20 50 48 50 55 6e 69 74 5f 54 65 73 74 43 61 73 65 0d 0a 7b 0d 0a 20 20 20 2f | xtends.PHPUnit_TestCase..{...../ |
13240 | 2a 2a 0d 0a 20 20 20 20 2a 20 41 6e 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 20 6f 62 | **......*.An.HTML_Template_IT.ob |
13260 | 6a 65 63 74 0d 0a 20 20 20 20 2a 20 40 76 61 72 20 6f 62 6a 65 63 74 0d 0a 20 20 20 20 2a 2f 0d | ject......*.@var.object......*/. |
13280 | 0a 20 20 20 20 76 61 72 20 24 74 70 6c 3b 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 49 | .....var.$tpl;........function.I |
132a0 | 54 5f 61 70 69 5f 54 65 73 74 43 61 73 65 28 24 6e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 | T_api_TestCase($name)......{.... |
132c0 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 50 48 50 55 6e 69 74 5f 54 65 73 74 43 61 73 65 28 24 6e | ......$this->PHPUnit_TestCase($n |
132e0 | 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 | ame);......}........function.set |
13300 | 55 70 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 20 | Up()......{..........$this->tpl. |
13320 | 3d 26 20 6e 65 77 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 28 27 2e 2f 74 65 6d 70 6c | =&.new.HTML_Template_IT('./templ |
13340 | 61 74 65 73 27 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 | ates');......}........function.t |
13360 | 65 61 72 44 6f 77 6e 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 75 6e 73 65 74 28 | earDown()......{..........unset( |
13380 | 24 74 68 69 73 2d 3e 74 70 6c 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 | $this->tpl);......}........funct |
133a0 | 69 6f 6e 20 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 73 74 72 29 0d 0a 20 20 20 20 | ion._stripWhitespace($str)...... |
133c0 | 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 65 67 5f 72 65 70 6c 61 63 65 28 27 | {..........return.preg_replace(' |
133e0 | 2f 5c 5c 73 2b 2f 27 2c 20 27 27 2c 20 24 73 74 72 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 | /\\s+/',.'',.$str);......}...... |
13400 | 20 20 66 75 6e 63 74 69 6f 6e 20 5f 6d 65 74 68 6f 64 45 78 69 73 74 73 28 24 6e 61 6d 65 29 20 | ..function._methodExists($name). |
13420 | 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 5f 61 72 72 61 79 28 73 74 | ......{..........if.(in_array(st |
13440 | 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 29 2c 20 67 65 74 5f 63 6c 61 73 73 5f 6d 65 74 68 6f | rtolower($name),.get_class_metho |
13460 | 64 73 28 24 74 68 69 73 2d 3e 74 70 6c 29 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 | ds($this->tpl))).{.............. |
13480 | 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 | return.true;..........}......... |
134a0 | 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 6d 65 74 68 6f | .$this->assertTrue(false,.'metho |
134c0 | 64 20 27 2e 20 24 6e 61 6d 65 20 2e 20 27 20 6e 6f 74 20 69 6d 70 6c 65 6d 65 6e 74 65 64 20 69 | d.'..$name...'.not.implemented.i |
134e0 | 6e 20 27 20 2e 20 67 65 74 5f 63 6c 61 73 73 28 24 74 68 69 73 2d 3e 74 70 6c 29 29 3b 0d 0a 20 | n.'...get_class($this->tpl));... |
13500 | 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 | .......return.false;......}..... |
13520 | 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 20 54 65 73 74 73 20 61 20 73 65 74 54 65 6d 70 6c 61 74 65 | ../**......*.Tests.a.setTemplate |
13540 | 20 6d 65 74 68 6f 64 20 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 66 75 6e | .method.......*......*/......fun |
13560 | 63 74 69 6f 6e 20 74 65 73 74 53 65 74 54 65 6d 70 6c 61 74 65 28 29 0d 0a 20 20 20 20 7b 0d 0a | ction.testSetTemplate()......{.. |
13580 | 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 | ........$result.=.$this->tpl->se |
135a0 | 74 54 65 6d 70 6c 61 74 65 28 27 41 20 74 65 6d 70 6c 61 74 65 27 2c 20 66 61 6c 73 65 2c 20 66 | tTemplate('A.template',.false,.f |
135c0 | 61 6c 73 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f | alse);..........if.(PEAR::isErro |
135e0 | 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 | r($result)).{..............$this |
13600 | 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 73 65 74 74 69 | ->assertTrue(false,.'Error.setti |
13620 | 6e 67 20 74 65 6d 70 6c 61 74 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 | ng.template:.'..$result->getMess |
13640 | 61 67 65 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 | age());..........}..........$thi |
13660 | 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 41 20 74 65 6d 70 6c 61 74 65 27 2c 20 24 74 | s->assertEquals('A.template',.$t |
13680 | 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 2f | his->tpl->get());......}......./ |
136a0 | 2a 2a 0d 0a 20 20 20 20 2a 20 54 65 73 74 73 20 61 20 6c 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 | **......*.Tests.a.loadTemplatefi |
136c0 | 6c 65 20 6d 65 74 68 6f 64 20 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 66 | le.method.......*......*/......f |
136e0 | 75 6e 63 74 69 6f 6e 20 74 65 73 74 4c 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 6c 65 28 29 0d 0a | unction.testLoadTemplatefile().. |
13700 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e | ....{..........$result.=.$this-> |
13720 | 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 6c 65 28 27 6c 6f 61 64 74 65 6d 70 6c | tpl->loadTemplatefile('loadtempl |
13740 | 61 74 65 66 69 6c 65 2e 68 74 6d 6c 27 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 65 29 3b 0d 0a 20 | atefile.html',.false,.false);... |
13760 | 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 | .......if.(PEAR::isError($result |
13780 | 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 | )).{..............$this->assertT |
137a0 | 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 | rue(false,.'Error.loading.templa |
137c0 | 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 | te.file:.'..$result->getMessage( |
137e0 | 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 | ));..........}..........$this->a |
13800 | 73 73 65 72 74 45 71 75 61 6c 73 28 27 41 20 74 65 6d 70 6c 61 74 65 27 2c 20 74 72 69 6d 28 24 | ssertEquals('A.template',.trim($ |
13820 | 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 | this->tpl->get()));......}...... |
13840 | 20 2f 2a 2a 0d 0a 20 20 20 20 2a 20 54 65 73 74 73 20 61 20 73 65 74 56 61 72 69 61 62 6c 65 20 | ./**......*.Tests.a.setVariable. |
13860 | 6d 65 74 68 6f 64 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 66 75 6e 63 74 | method......*......*/......funct |
13880 | 69 6f 6e 20 74 65 73 74 53 65 74 56 61 72 69 61 62 6c 65 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 | ion.testSetVariable()......{.... |
138a0 | 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 54 | ......$result.=.$this->tpl->setT |
138c0 | 65 6d 70 6c 61 74 65 28 27 7b 70 6c 61 63 65 68 6f 6c 64 65 72 31 7d 20 7b 70 6c 61 63 65 68 6f | emplate('{placeholder1}.{placeho |
138e0 | 6c 64 65 72 32 7d 20 7b 70 6c 61 63 65 68 6f 6c 64 65 72 33 7d 27 2c 20 74 72 75 65 2c 20 74 72 | lder2}.{placeholder3}',.true,.tr |
13900 | 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 | ue);..........if.(PEAR::isError( |
13920 | 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | $result)).{..............$this-> |
13940 | 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 73 65 74 74 69 6e 67 | assertTrue(false,.'Error.setting |
13960 | 20 74 65 6d 70 6c 61 74 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 | .template:.'..$result->getMessag |
13980 | 65 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 22 73 63 | e());..........}..........//."sc |
139a0 | 61 6c 61 72 22 20 63 61 6c 6c 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e | alar".call..........$this->tpl-> |
139c0 | 73 65 74 56 61 72 69 61 62 6c 65 28 27 70 6c 61 63 65 68 6f 6c 64 65 72 31 27 2c 20 27 76 61 72 | setVariable('placeholder1',.'var |
139e0 | 31 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 61 72 72 61 79 20 63 61 6c 6c 0d 0a 20 20 20 | 1');..........//.array.call..... |
13a00 | 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 61 72 72 | .....$this->tpl->setVariable(arr |
13a20 | 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 70 6c 61 63 65 68 6f 6c 64 65 72 32 27 20 | ay(..............'placeholder2'. |
13a40 | 3d 3e 20 27 76 61 72 32 27 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 70 6c 61 63 65 68 6f | =>.'var2',..............'placeho |
13a60 | 6c 64 65 72 33 27 20 3d 3e 20 27 76 61 72 33 27 0d 0a 20 20 20 20 20 20 20 20 29 29 3b 0d 0a 20 | lder3'.=>.'var3'..........));... |
13a80 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 76 61 72 31 | .......$this->assertEquals('var1 |
13aa0 | 20 76 61 72 32 20 76 61 72 33 27 2c 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 3b | .var2.var3',.$this->tpl->get()); |
13ac0 | 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 20 54 65 73 74 73 20 74 | ......}......./**......*.Tests.t |
13ae0 | 68 65 20 3c 21 2d 2d 20 49 4e 43 4c 55 44 45 20 2d 2d 3e 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 | he.<!--.INCLUDE.-->.functionalit |
13b00 | 79 20 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 | y.......*......*/......function. |
13b20 | 74 65 73 74 49 6e 63 6c 75 64 65 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 72 | testInclude()......{..........$r |
13b40 | 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 | esult.=.$this->tpl->loadTemplate |
13b60 | 46 69 6c 65 28 27 69 6e 63 6c 75 64 65 2e 68 74 6d 6c 27 2c 20 66 61 6c 73 65 2c 20 66 61 6c 73 | File('include.html',.false,.fals |
13b80 | 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 | e);..........if.(PEAR::isError($ |
13ba0 | 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 | result)).{..............$this->a |
13bc0 | 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 | ssertTrue(false,.'Error.loading. |
13be0 | 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 | template.file:.'..$result->getMe |
13c00 | 73 73 61 67 65 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 | ssage());..........}..........$t |
13c20 | 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 4d 61 73 74 65 72 20 66 69 6c 65 3b 20 | his->assertEquals('Master.file;. |
13c40 | 49 6e 63 6c 75 64 65 64 20 66 69 6c 65 27 2c 20 74 72 69 6d 28 24 74 68 69 73 2d 3e 74 70 6c 2d | Included.file',.trim($this->tpl- |
13c60 | 3e 67 65 74 28 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 | >get()));......}......./**...... |
13c80 | 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 43 75 72 72 | *......*/......function.testCurr |
13ca0 | 65 6e 74 42 6c 6f 63 6b 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 | entBlock()......{..........$resu |
13cc0 | 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 46 69 6c | lt.=.$this->tpl->loadTemplateFil |
13ce0 | 65 28 27 62 6c 6f 63 6b 69 74 65 72 61 74 69 6f 6e 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 | e('blockiteration.html',.true,.t |
13d00 | 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 | rue);..........if.(PEAR::isError |
13d20 | 28 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | ($result)).{..............$this- |
13d40 | 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e | >assertTrue(false,.'Error.loadin |
13d60 | 67 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 | g.template.file:.'..$result->get |
13d80 | 4d 65 73 73 61 67 65 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 | Message());..........}.......... |
13da0 | 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6f 75 74 65 72 27 2c | $this->tpl->setVariable('outer', |
13dc0 | 20 27 61 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 43 | .'a');..........$this->tpl->setC |
13de0 | 75 72 72 65 6e 74 42 6c 6f 63 6b 28 27 69 6e 6e 65 72 5f 62 6c 6f 63 6b 27 29 3b 0d 0a 20 20 20 | urrentBlock('inner_block');..... |
13e00 | 20 20 20 20 20 66 6f 72 20 28 24 69 20 3d 20 30 3b 20 24 69 20 3c 20 35 3b 20 24 69 2b 2b 29 20 | .....for.($i.=.0;.$i.<.5;.$i++). |
13e20 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 | {..............$this->tpl->setVa |
13e40 | 72 69 61 62 6c 65 28 27 69 6e 6e 65 72 27 2c 20 24 69 20 2b 20 31 29 3b 0d 0a 20 20 20 20 20 20 | riable('inner',.$i.+.1);........ |
13e60 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 43 75 72 72 65 6e 74 42 6c | ......$this->tpl->parseCurrentBl |
13e80 | 6f 63 6b 28 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 20 2f 2f 20 66 6f 72 0d 0a 20 20 20 20 20 20 | ock();..........}.//.for........ |
13ea0 | 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 61 7c 31 7c 32 7c 33 7c 34 | ..$this->assertEquals('a|1|2|3|4 |
13ec0 | 7c 35 23 27 2c 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 | |5#',.$this->_stripWhitespace($t |
13ee0 | 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 | his->tpl->get()));......}....... |
13f00 | 2f 2a 2a 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e | /**......*......*/......function |
13f20 | 20 74 65 73 74 52 65 6d 6f 76 65 50 6c 61 63 65 68 6f 6c 64 65 72 73 28 29 0d 0a 20 20 20 20 7b | .testRemovePlaceholders()......{ |
13f40 | 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e | ..........$result.=.$this->tpl-> |
13f60 | 73 65 74 54 65 6d 70 6c 61 74 65 28 27 7b 70 6c 61 63 65 68 6f 6c 64 65 72 31 7d 2c 7b 70 6c 61 | setTemplate('{placeholder1},{pla |
13f80 | 63 65 68 6f 6c 64 65 72 32 7d 2c 7b 70 6c 61 63 65 68 6f 6c 64 65 72 33 7d 27 2c 20 74 72 75 65 | ceholder2},{placeholder3}',.true |
13fa0 | 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 | ,.true);..........if.(PEAR::isEr |
13fc0 | 72 6f 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 | ror($result)).{..............$th |
13fe0 | 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 73 65 74 | is->assertTrue(false,.'Error.set |
14000 | 74 69 6e 67 20 74 65 6d 70 6c 61 74 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 | ting.template:.'..$result->getMe |
14020 | 73 73 61 67 65 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 2f 2f | ssage());..........}..........// |
14040 | 20 77 65 20 64 6f 20 6e 6f 74 20 73 65 74 20 7b 70 6c 61 63 65 68 6f 6c 64 65 72 33 7d 0d 0a 20 | .we.do.not.set.{placeholder3}... |
14060 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 61 | .......$this->tpl->setVariable(a |
14080 | 72 72 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 70 6c 61 63 65 68 6f 6c 64 65 72 31 | rray(..............'placeholder1 |
140a0 | 27 20 3d 3e 20 27 76 61 72 31 27 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 70 6c 61 63 65 | '.=>.'var1',..............'place |
140c0 | 68 6f 6c 64 65 72 32 27 20 3d 3e 20 27 76 61 72 32 27 0d 0a 20 20 20 20 20 20 20 20 29 29 3b 0d | holder2'.=>.'var2'..........));. |
140e0 | 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 76 61 | .........$this->assertEquals('va |
14100 | 72 31 2c 76 61 72 32 2c 27 2c 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 3b 0d 0a | r1,var2,',.$this->tpl->get());.. |
14120 | 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 4e 6f 77 2c 20 77 65 20 73 68 6f 75 6c 64 20 72 65 61 6c | ..........//.Now,.we.should.real |
14140 | 6c 79 20 61 64 64 20 61 20 73 77 69 74 63 68 20 66 6f 72 20 6b 65 65 70 69 6e 67 20 7b 73 74 75 | ly.add.a.switch.for.keeping.{stu |
14160 | 66 66 7d 20 69 6e 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 64 61 74 61 20 73 75 70 70 6c 69 65 64 | ff}.in..........//.data.supplied |
14180 | 20 74 6f 20 73 65 74 56 61 72 69 61 62 6c 65 28 29 20 73 61 66 65 2e 20 55 6e 74 69 6c 20 74 68 | .to.setVariable().safe..Until.th |
141a0 | 65 6e 2c 20 72 65 6d 6f 76 69 6e 67 20 69 74 20 73 68 6f 75 6c 64 0d 0a 20 20 20 20 20 20 20 20 | en,.removing.it.should.......... |
141c0 | 2f 2f 20 62 65 20 65 78 70 65 63 74 65 64 20 62 65 68 61 76 69 6f 75 72 0d 0a 20 20 20 20 20 20 | //.be.expected.behaviour........ |
141e0 | 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 54 65 6d 70 6c | ..$result.=.$this->tpl->setTempl |
14200 | 61 74 65 28 27 7b 70 6c 61 63 65 68 6f 6c 64 65 72 31 7d 2c 7b 70 6c 61 63 65 68 6f 6c 64 65 72 | ate('{placeholder1},{placeholder |
14220 | 32 7d 2c 7b 70 6c 61 63 65 68 6f 6c 64 65 72 33 7d 27 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b | 2},{placeholder3}',.true,.true); |
14240 | 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 | ..........if.(PEAR::isError($res |
14260 | 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 | ult)).{..............$this->asse |
14280 | 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 73 65 74 74 69 6e 67 20 74 65 6d | rtTrue(false,.'Error.setting.tem |
142a0 | 70 6c 61 74 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 | plate:.'..$result->getMessage()) |
142c0 | 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c | ;..........}..........$this->tpl |
142e0 | 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 61 72 72 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 | ->setVariable(array(............ |
14300 | 20 20 27 70 6c 61 63 65 68 6f 6c 64 65 72 31 27 20 3d 3e 20 27 76 61 72 31 27 2c 0d 0a 20 20 20 | ..'placeholder1'.=>.'var1',..... |
14320 | 20 20 20 20 20 20 20 20 20 27 70 6c 61 63 65 68 6f 6c 64 65 72 32 27 20 3d 3e 20 27 76 61 72 32 | .........'placeholder2'.=>.'var2 |
14340 | 27 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 70 6c 61 63 65 68 6f 6c 64 65 72 33 27 20 3d | ',..............'placeholder3'.= |
14360 | 3e 20 27 76 61 72 33 7b 73 74 75 66 66 7d 27 0d 0a 20 20 20 20 20 20 20 20 29 29 3b 0d 0a 20 20 | >.'var3{stuff}'..........));.... |
14380 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 76 61 72 31 2c | ......$this->assertEquals('var1, |
143a0 | 76 61 72 32 2c 76 61 72 33 27 2c 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 3b 0d | var2,var3',.$this->tpl->get());. |
143c0 | 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d | .....}......./**......*......*/. |
143e0 | 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 54 6f 75 63 68 42 6c 6f 63 6b 28 29 0d 0a | .....function.testTouchBlock().. |
14400 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e | ....{..........$result.=.$this-> |
14420 | 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 27 62 6c 6f 63 6b 69 74 65 72 | tpl->loadTemplateFile('blockiter |
14440 | 61 74 69 6f 6e 2e 68 74 6d 6c 27 2c 20 66 61 6c 73 65 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 | ation.html',.false,.true);...... |
14460 | 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 29 20 | ....if.(PEAR::isError($result)). |
14480 | 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 | {..............$this->assertTrue |
144a0 | 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 65 20 | (false,.'Error.loading.template. |
144c0 | 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b | file:.'..$result->getMessage()); |
144e0 | 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d | ..........}..........$this->tpl- |
14500 | 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6f 75 74 65 72 27 2c 20 27 64 61 74 61 27 29 3b 0d 0a | >setVariable('outer',.'data');.. |
14520 | 20 20 20 20 20 20 20 20 2f 2f 20 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 73 68 6f 75 6c 64 20 62 65 | ........//.inner_block.should.be |
14540 | 20 70 72 65 73 65 72 76 65 64 20 69 6e 20 6f 75 74 70 75 74 2c 20 65 76 65 6e 20 69 66 20 65 6d | .preserved.in.output,.even.if.em |
14560 | 70 74 79 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 74 6f 75 63 68 42 6c | pty..........$this->tpl->touchBl |
14580 | 6f 63 6b 28 27 69 6e 6e 65 72 5f 62 6c 6f 63 6b 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 | ock('inner_block');..........$th |
145a0 | 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 64 61 74 61 7c 7b 69 6e 6e 65 72 7d 23 27 | is->assertEquals('data|{inner}#' |
145c0 | 2c 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d | ,.$this->_stripWhitespace($this- |
145e0 | 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 20 20 20 0d 0a 20 20 20 20 | >tpl->get()));......}........... |
14600 | 2f 2f 20 4e 6f 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 74 6f 63 6b 20 63 6c 61 73 73 0d | //.Not.available.in.stock.class. |
14620 | 0a 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 20 20 20 20 2f 2a | ....../**......*......*/....../* |
14640 | 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 48 69 64 65 42 6c 6f 63 6b 28 29 0d 0a | ......function.testHideBlock().. |
14660 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 24 74 68 69 73 2d 3e 5f 6d 65 74 68 | ....{..........if.(!$this->_meth |
14680 | 6f 64 45 78 69 73 74 73 28 27 68 69 64 65 42 6c 6f 63 6b 27 29 29 20 7b 0d 0a 20 20 20 20 20 20 | odExists('hideBlock')).{........ |
146a0 | 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 | ......return;..........}........ |
146c0 | 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 | ..$result.=.$this->tpl->loadTemp |
146e0 | 6c 61 74 65 46 69 6c 65 28 27 62 6c 6f 63 6b 69 74 65 72 61 74 69 6f 6e 2e 68 74 6d 6c 27 2c 20 | lateFile('blockiteration.html',. |
14700 | 66 61 6c 73 65 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a | false,.true);..........if.(PEAR: |
14720 | 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 | :isError($result)).{............ |
14740 | 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f | ..$this->assertTrue(false,.'Erro |
14760 | 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 | r.loading.template.file:.'..$res |
14780 | 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a | ult->getMessage());..........}.. |
147a0 | 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 | ........$this->tpl->setVariable( |
147c0 | 61 72 72 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 6f 75 74 65 72 27 20 3d 3e 20 27 | array(..............'outer'.=>.' |
147e0 | 64 61 74 61 27 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 69 6e 6e 65 72 27 20 3d 3e 20 27 | data',..............'inner'.=>.' |
14800 | 73 74 75 66 66 27 0d 0a 20 20 20 20 20 20 20 20 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 | stuff'..........));..........//. |
14820 | 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 2c 20 62 75 74 20 73 68 | inner_block.is.not.empty,.but.sh |
14840 | 6f 75 6c 64 20 62 65 20 72 65 6d 6f 76 65 64 20 6e 6f 6e 65 74 68 65 6c 65 73 73 0d 0a 20 20 20 | ould.be.removed.nonetheless..... |
14860 | 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 68 69 64 65 42 6c 6f 63 6b 28 27 69 6e 6e 65 | .....$this->tpl->hideBlock('inne |
14880 | 72 5f 62 6c 6f 63 6b 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 | r_block');..........$this->asser |
148a0 | 74 45 71 75 61 6c 73 28 27 64 61 74 61 23 27 2c 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 | tEquals('data#',.$this->_stripWh |
148c0 | 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0d 0a 20 | itespace($this->tpl->get()));... |
148e0 | 20 20 20 7d 0d 0a 09 2a 2f 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f | ...}...*/...../**......*......*/ |
14900 | 0d 0a 20 20 20 20 2f 2a 0d 0a 09 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 53 65 74 47 6c 6f 62 61 | ....../*...function.testSetGloba |
14920 | 6c 56 61 72 69 61 62 6c 65 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 | lVariable()......{..........if.( |
14940 | 21 24 74 68 69 73 2d 3e 5f 6d 65 74 68 6f 64 45 78 69 73 74 73 28 27 73 65 74 47 6c 6f 62 61 6c | !$this->_methodExists('setGlobal |
14960 | 56 61 72 69 61 62 6c 65 27 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 | Variable')).{..............retur |
14980 | 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d | n;..........}..........$result.= |
149a0 | 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 27 67 | .$this->tpl->loadTemplateFile('g |
149c0 | 6c 6f 62 61 6c 73 2e 68 74 6d 6c 27 2c 20 66 61 6c 73 65 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 | lobals.html',.false,.true);..... |
149e0 | 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 29 | .....if.(PEAR::isError($result)) |
14a00 | 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 | .{..............$this->assertTru |
14a20 | 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 65 | e(false,.'Error.loading.template |
14a40 | 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 | .file:.'..$result->getMessage()) |
14a60 | 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c | ;..........}..........$this->tpl |
14a80 | 2d 3e 73 65 74 47 6c 6f 62 61 6c 56 61 72 69 61 62 6c 65 28 27 67 6c 6f 62 27 2c 20 27 67 6c 6f | ->setGlobalVariable('glob',.'glo |
14aa0 | 62 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 2f 2f 20 7b 76 61 72 32 7d 20 69 73 20 6e 6f 74 2c 20 | b');..........//.{var2}.is.not,. |
14ac0 | 62 6c 6f 63 6b 5f 74 77 6f 20 73 68 6f 75 6c 64 20 62 65 20 72 65 6d 6f 76 65 64 0d 0a 20 20 20 | block_two.should.be.removed..... |
14ae0 | 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 61 72 72 | .....$this->tpl->setVariable(arr |
14b00 | 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 76 61 72 31 27 20 3d 3e 20 27 6f 6e 65 27 | ay(..............'var1'.=>.'one' |
14b20 | 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 76 61 72 33 27 20 3d 3e 20 27 74 68 72 65 65 27 | ,..............'var3'.=>.'three' |
14b40 | 0d 0a 20 20 20 20 20 20 20 20 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 24 69 20 3d | ..........));..........for.($i.= |
14b60 | 20 30 3b 20 24 69 20 3c 20 33 3b 20 24 69 2b 2b 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 | .0;.$i.<.3;.$i++).{............. |
14b80 | 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 76 61 72 34 27 2c | .$this->tpl->setVariable('var4', |
14ba0 | 20 24 69 20 2b 20 31 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 | .$i.+.1);..............$this->tp |
14bc0 | 6c 2d 3e 70 61 72 73 65 28 27 62 6c 6f 63 6b 5f 66 6f 75 72 27 29 3b 0d 0a 20 20 20 20 20 20 20 | l->parse('block_four');......... |
14be0 | 20 7d 20 2f 2f 20 66 6f 72 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 | .}.//.for..........$this->assert |
14c00 | 45 71 75 61 6c 73 28 27 67 6c 6f 62 3a 6f 6e 65 23 67 6c 6f 62 3a 74 68 72 65 65 7c 67 6c 6f 62 | Equals('glob:one#glob:three|glob |
14c20 | 3a 31 7c 67 6c 6f 62 3a 32 7c 67 6c 6f 62 3a 33 23 27 2c 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 | :1|glob:2|glob:3#',.$this->_stri |
14c40 | 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b | pWhitespace($this->tpl->get())); |
14c60 | 0d 0a 20 20 20 20 7d 0d 0a 09 2a 2f 0d 0a 7d 0d 0a 0d 0a 3f 3e 0d 0a 00 00 00 00 00 00 00 00 00 | ......}...*/..}....?>........... |
14c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14e00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 49 54 5f 75 73 | HTML_Template_IT-1.1/tests/IT_us |
14e20 | 61 67 65 5f 74 65 73 74 63 61 73 65 2e 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | age_testcase.php................ |
14e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14e60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
14e80 | 20 20 20 37 31 33 32 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 34 37 34 30 20 00 00 00 00 00 | ...7132..7633514211..14740...... |
14ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15000 | 3c 3f 70 68 70 0d 0a 0d 0a 63 6c 61 73 73 20 49 54 5f 55 73 61 67 65 5f 54 65 73 74 43 61 73 65 | <?php....class.IT_Usage_TestCase |
15020 | 20 65 78 74 65 6e 64 73 20 50 48 50 55 6e 69 74 5f 54 65 73 74 43 61 73 65 0d 0a 7b 0d 0a 20 20 | .extends.PHPUnit_TestCase..{.... |
15040 | 20 2f 2a 2a 0d 0a 20 20 20 20 2a 20 41 6e 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 20 | ./**......*.An.HTML_Template_IT. |
15060 | 6f 62 6a 65 63 74 0d 0a 20 20 20 20 2a 20 40 76 61 72 20 6f 62 6a 65 63 74 0d 0a 20 20 20 20 2a | object......*.@var.object......* |
15080 | 2f 0d 0a 20 20 20 20 76 61 72 20 24 74 70 6c 3b 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e | /......var.$tpl;........function |
150a0 | 20 49 54 5f 55 73 61 67 65 5f 54 65 73 74 43 61 73 65 28 24 6e 61 6d 65 29 0d 0a 20 20 20 20 7b | .IT_Usage_TestCase($name)......{ |
150c0 | 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 50 48 50 55 6e 69 74 5f 54 65 73 74 43 61 73 | ..........$this->PHPUnit_TestCas |
150e0 | 65 28 24 6e 61 6d 65 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e | e($name);......}........function |
15100 | 20 73 65 74 55 70 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | .setUp()......{..........$this-> |
15120 | 74 70 6c 20 3d 26 20 6e 65 77 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 28 27 2e 2f 74 | tpl.=&.new.HTML_Template_IT('./t |
15140 | 65 6d 70 6c 61 74 65 73 27 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 | emplates');......}........functi |
15160 | 6f 6e 20 74 65 61 72 44 6f 77 6e 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 75 6e | on.tearDown()......{..........un |
15180 | 73 65 74 28 24 74 68 69 73 2d 3e 74 70 6c 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 | set($this->tpl);......}........f |
151a0 | 75 6e 63 74 69 6f 6e 20 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 73 74 72 29 0d 0a | unction._stripWhitespace($str).. |
151c0 | 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 70 72 65 67 5f 72 65 70 6c 61 | ....{..........return.preg_repla |
151e0 | 63 65 28 27 2f 5c 5c 73 2b 2f 27 2c 20 27 27 2c 20 24 73 74 72 29 3b 0d 0a 20 20 20 20 7d 0d 0a | ce('/\\s+/',.'',.$str);......}.. |
15200 | 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 5f 6d 65 74 68 6f 64 45 78 69 73 74 73 28 24 6e 61 | ......function._methodExists($na |
15220 | 6d 65 29 20 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 69 6e 5f 61 72 72 61 | me).......{..........if.(in_arra |
15240 | 79 28 73 74 72 74 6f 6c 6f 77 65 72 28 24 6e 61 6d 65 29 2c 20 67 65 74 5f 63 6c 61 73 73 5f 6d | y(strtolower($name),.get_class_m |
15260 | 65 74 68 6f 64 73 28 24 74 68 69 73 2d 3e 74 70 6c 29 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 | ethods($this->tpl))).{.......... |
15280 | 20 20 20 20 72 65 74 75 72 6e 20 74 72 75 65 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 | ....return.true;..........}..... |
152a0 | 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 6d | .....$this->assertTrue(false,.'m |
152c0 | 65 74 68 6f 64 20 27 2e 20 24 6e 61 6d 65 20 2e 20 27 20 6e 6f 74 20 69 6d 70 6c 65 6d 65 6e 74 | ethod.'..$name...'.not.implement |
152e0 | 65 64 20 69 6e 20 27 20 2e 20 67 65 74 5f 63 6c 61 73 73 28 24 74 68 69 73 2d 3e 74 70 6c 29 29 | ed.in.'...get_class($this->tpl)) |
15300 | 3b 0d 0a 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 66 61 6c 73 65 3b 0d 0a 20 20 20 20 7d 0d | ;..........return.false;......}. |
15320 | 0a 0d 0a 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 20 54 65 73 74 73 20 69 74 65 72 61 74 69 | ......../**......*.Tests.iterati |
15340 | 6f 6e 73 20 6f 76 65 72 20 74 77 6f 20 62 6c 6f 63 6b 73 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 | ons.over.two.blocks......*...... |
15360 | 2a 2f 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 42 6c 6f 63 6b 49 74 65 72 61 74 | */......function.testBlockIterat |
15380 | 69 6f 6e 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 64 61 74 61 20 3d 20 61 72 | ion()......{..........$data.=.ar |
153a0 | 72 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 61 27 2c 0d 0a 20 20 20 20 20 20 20 20 | ray(..............'a',.......... |
153c0 | 20 20 20 20 61 72 72 61 79 28 27 62 27 2c 20 61 72 72 61 79 28 27 31 27 2c 20 27 32 27 2c 20 27 | ....array('b',.array('1',.'2',.' |
153e0 | 33 27 2c 20 27 34 27 29 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 63 27 2c 0d 0a 20 20 | 3',.'4')),..............'c',.... |
15400 | 20 20 20 20 20 20 20 20 20 20 61 72 72 61 79 28 27 64 27 2c 20 61 72 72 61 79 28 27 35 27 2c 20 | ..........array('d',.array('5',. |
15420 | 27 36 27 2c 20 27 37 27 29 29 0d 0a 20 20 20 20 20 20 20 20 29 3b 0d 0a 20 20 20 20 20 20 20 20 | '6',.'7'))..........);.......... |
15440 | 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e | ..........$result.=.$this->tpl-> |
15460 | 6c 6f 61 64 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 27 62 6c 6f 63 6b 69 74 65 72 61 74 69 6f 6e | loadTemplateFile('blockiteration |
15480 | 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 66 | .html',.true,.true);..........if |
154a0 | 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 20 | .(PEAR::isError($result)).{..... |
154c0 | 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 | .........$this->assertTrue(false |
154e0 | 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a 20 | ,.'Error.loading.template.file:. |
15500 | 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0d 0a 20 20 20 20 | '..$result->getMessage());...... |
15520 | 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 65 61 63 68 20 28 24 64 61 74 61 20 61 73 | ....}..........foreach.($data.as |
15540 | 20 24 76 61 6c 75 65 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 69 73 5f 61 | .$value).{..............if.(is_a |
15560 | 72 72 61 79 28 24 76 61 6c 75 65 29 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | rray($value)).{................. |
15580 | 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6f 75 74 65 72 27 | .$this->tpl->setVariable('outer' |
155a0 | 2c 20 24 76 61 6c 75 65 5b 30 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 | ,.$value[0]);..................f |
155c0 | 6f 72 65 61 63 68 20 28 24 76 61 6c 75 65 5b 31 5d 20 61 73 20 24 76 29 20 7b 0d 0a 20 20 20 20 | oreach.($value[1].as.$v).{...... |
155e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 | ................$this->tpl->setV |
15600 | 61 72 69 61 62 6c 65 28 27 69 6e 6e 65 72 27 2c 20 24 76 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 | ariable('inner',.$v);........... |
15620 | 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 27 69 6e | ...........$this->tpl->parse('in |
15640 | 6e 65 72 5f 62 6c 6f 63 6b 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | ner_block');..................}. |
15660 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 20 65 6c 73 65 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 | .............}.else.{........... |
15680 | 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 | .......$this->tpl->setVariable(' |
156a0 | 6f 75 74 65 72 27 2c 20 24 76 61 6c 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d | outer',.$value);..............}. |
156c0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 27 | .............$this->tpl->parse(' |
156e0 | 6f 75 74 65 72 5f 62 6c 6f 63 6b 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 | outer_block');..........}....... |
15700 | 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 61 23 62 7c 31 7c 32 7c | ...$this->assertEquals('a#b|1|2| |
15720 | 33 7c 34 23 63 23 64 7c 35 7c 36 7c 37 23 27 2c 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 | 3|4#c#d|5|6|7#',.$this->_stripWh |
15740 | 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0d 0a 20 | itespace($this->tpl->get()));... |
15760 | 20 20 20 7d 0d 0a 0d 0a 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 20 0d 0a 20 20 20 20 2a 0d 0a 20 | ...}......./**......*.......*... |
15780 | 20 20 20 2a 2f 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 54 6f 75 63 68 42 6c 6f | ...*/......function.testTouchBlo |
157a0 | 63 6b 49 74 65 72 61 74 69 6f 6e 28 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 64 | ckIteration()......{..........$d |
157c0 | 61 74 61 20 3d 20 61 72 72 61 79 28 27 61 27 2c 27 62 27 2c 27 63 27 2c 27 64 27 2c 27 65 27 29 | ata.=.array('a','b','c','d','e') |
157e0 | 3b 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d | ;..........$result.=.$this->tpl- |
15800 | 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 27 62 6c 6f 63 6b 69 74 65 72 61 74 69 6f | >loadTemplateFile('blockiteratio |
15820 | 6e 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b 0d 0a 20 20 20 20 20 20 20 20 69 | n.html',.true,.true);..........i |
15840 | 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0d 0a 20 20 | f.(PEAR::isError($result)).{.... |
15860 | 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 | ..........$this->assertTrue(fals |
15880 | 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a | e,.'Error.loading.template.file: |
158a0 | 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0d 0a 20 20 20 | .'..$result->getMessage());..... |
158c0 | 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 24 69 20 3d 20 30 3b 20 24 69 20 | .....}..........for.($i.=.0;.$i. |
158e0 | 3c 20 63 6f 75 6e 74 28 24 64 61 74 61 29 3b 20 24 69 2b 2b 29 20 7b 0d 0a 20 20 20 20 20 20 20 | <.count($data);.$i++).{......... |
15900 | 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6f 75 | .....$this->tpl->setVariable('ou |
15920 | 74 65 72 27 2c 20 24 64 61 74 61 5b 24 69 5d 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f | ter',.$data[$i]);............../ |
15940 | 2f 20 74 68 65 20 69 6e 6e 65 72 5f 62 6c 6f 63 6b 20 69 73 20 65 6d 70 74 79 20 61 6e 64 20 73 | /.the.inner_block.is.empty.and.s |
15960 | 68 6f 75 6c 64 20 62 65 20 72 65 6d 6f 76 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | hould.be.removed..............if |
15980 | 20 28 30 20 3d 3d 20 24 69 20 25 20 32 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | .(0.==.$i.%.2).{................ |
159a0 | 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 74 6f 75 63 68 42 6c 6f 63 6b 28 27 69 6e 6e 65 72 5f | ..$this->tpl->touchBlock('inner_ |
159c0 | 62 6c 6f 63 6b 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 | block');..............}......... |
159e0 | 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 27 6f 75 74 65 72 5f 62 6c | .....$this->tpl->parse('outer_bl |
15a00 | 6f 63 6b 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 | ock');..........}..........$this |
15a20 | 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 61 7c 23 62 23 63 7c 23 64 23 65 7c 23 27 2c 20 | ->assertEquals('a|#b#c|#d#e|#',. |
15a40 | 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 | $this->_stripWhitespace($this->t |
15a60 | 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 2f 2f 20 4e 6f | pl->get()));......}........//.No |
15a80 | 74 20 61 76 61 69 6c 61 62 6c 65 20 69 6e 20 73 74 6f 63 6b 20 76 65 72 73 69 6f 6e 0d 0a 0d 0a | t.available.in.stock.version.... |
15aa0 | 20 20 20 2f 2a 2a 0d 0a 20 20 20 20 2a 0d 0a 20 20 20 20 2a 2f 0d 0a 09 2f 2a 0d 0a 20 20 20 20 | .../**......*......*/.../*...... |
15ac0 | 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 48 69 64 65 42 6c 6f 63 6b 49 74 65 72 61 74 69 6f 6e 28 | function.testHideBlockIteration( |
15ae0 | 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 69 66 20 28 21 24 74 68 69 73 2d 3e 5f 6d | )......{..........if.(!$this->_m |
15b00 | 65 74 68 6f 64 45 78 69 73 74 73 28 27 68 69 64 65 42 6c 6f 63 6b 27 29 29 20 7b 0d 0a 20 20 20 | ethodExists('hideBlock')).{..... |
15b20 | 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 | .........return;..........}..... |
15b40 | 20 20 20 20 20 24 64 61 74 61 20 3d 20 61 72 72 61 79 28 27 61 27 2c 27 62 27 2c 27 63 27 2c 27 | .....$data.=.array('a','b','c',' |
15b60 | 64 27 2c 27 65 27 29 3b 0d 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 | d','e');..........$result.=.$thi |
15b80 | 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 46 69 6c 65 28 27 62 6c 6f 63 6b 69 | s->tpl->loadTemplateFile('blocki |
15ba0 | 74 65 72 61 74 69 6f 6e 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b 0d 0a 20 20 | teration.html',.true,.true);.... |
15bc0 | 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 | ......if.(PEAR::isError($result) |
15be0 | 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 | ).{..............$this->assertTr |
15c00 | 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 | ue(false,.'Error.loading.templat |
15c20 | 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 | e.file:.'..$result->getMessage() |
15c40 | 29 3b 0d 0a 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 66 6f 72 20 28 24 69 20 3d | );..........}..........for.($i.= |
15c60 | 20 30 3b 20 24 69 20 3c 20 63 6f 75 6e 74 28 24 64 61 74 61 29 3b 20 24 69 2b 2b 29 20 7b 0d 0a | .0;.$i.<.count($data);.$i++).{.. |
15c80 | 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 | ............$this->tpl->setVaria |
15ca0 | 62 6c 65 28 61 72 72 61 79 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 69 6e 6e | ble(array(..................'inn |
15cc0 | 65 72 27 20 3d 3e 20 24 69 20 2b 20 31 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | er'.=>.$i.+.1,.................. |
15ce0 | 27 6f 75 74 65 72 27 20 3d 3e 20 24 64 61 74 61 5b 24 69 5d 0d 0a 20 20 20 20 20 20 20 20 20 20 | 'outer'.=>.$data[$i]............ |
15d00 | 20 20 29 29 3b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 2f 2f 20 74 68 65 20 69 6e 6e 65 72 5f | ..));..............//.the.inner_ |
15d20 | 62 6c 6f 63 6b 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 2c 20 62 75 74 20 73 68 6f 75 6c 64 20 62 | block.is.not.empty,.but.should.b |
15d40 | 65 20 72 65 6d 6f 76 65 64 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 30 20 3d 3d 20 | e.removed..............if.(0.==. |
15d60 | 24 69 20 25 20 32 29 20 7b 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 | $i.%.2).{..................$this |
15d80 | 2d 3e 74 70 6c 2d 3e 68 69 64 65 42 6c 6f 63 6b 28 27 69 6e 6e 65 72 5f 62 6c 6f 63 6b 27 29 3b | ->tpl->hideBlock('inner_block'); |
15da0 | 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 | ..............}..............$th |
15dc0 | 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 27 6f 75 74 65 72 5f 62 6c 6f 63 6b 27 29 3b 0d 0a | is->tpl->parse('outer_block');.. |
15de0 | 20 20 20 20 20 20 20 20 7d 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 | ........}..........$this->assert |
15e00 | 45 71 75 61 6c 73 28 27 61 23 62 7c 32 23 63 23 64 7c 34 23 65 23 27 2c 20 24 74 68 69 73 2d 3e | Equals('a#b|2#c#d|4#e#',.$this-> |
15e20 | 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 | _stripWhitespace($this->tpl->get |
15e40 | 28 29 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 09 2a 2f 0d 0a 7d 0d 0a 3f 3e 0d 0a 00 00 00 00 00 00 | ()));......}...*/..}..?>........ |
15e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16000 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 49 54 58 5f 61 | HTML_Template_IT-1.1/tests/ITX_a |
16020 | 70 69 5f 74 65 73 74 63 61 73 65 2e 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | pi_testcase.php................. |
16040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16060 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
16080 | 20 20 31 33 35 35 32 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 34 35 36 30 20 00 00 00 00 00 | ..13552..7633514211..14560...... |
160a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
161a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
161c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
161e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16200 | 3c 3f 70 68 70 0a 0a 72 65 71 75 69 72 65 5f 6f 6e 63 65 20 27 49 54 5f 61 70 69 5f 74 65 73 74 | <?php..require_once.'IT_api_test |
16220 | 63 61 73 65 2e 70 68 70 27 3b 0a 0a 66 75 6e 63 74 69 6f 6e 20 5f 75 70 70 65 72 63 61 73 65 43 | case.php';..function._uppercaseC |
16240 | 61 6c 6c 62 61 63 6b 28 24 61 72 79 29 0a 7b 0a 20 20 20 20 72 65 74 75 72 6e 20 73 74 72 74 6f | allback($ary).{.....return.strto |
16260 | 75 70 70 65 72 28 24 61 72 79 5b 30 5d 29 3b 0a 7d 0a 0a 0a 63 6c 61 73 73 20 49 54 58 5f 61 70 | upper($ary[0]);.}...class.ITX_ap |
16280 | 69 5f 54 65 73 74 43 61 73 65 20 65 78 74 65 6e 64 73 20 49 54 5f 61 70 69 5f 54 65 73 74 43 61 | i_TestCase.extends.IT_api_TestCa |
162a0 | 73 65 0a 7b 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 49 54 58 5f 61 70 69 5f 54 65 73 74 43 61 | se.{.....function.ITX_api_TestCa |
162c0 | 73 65 28 24 6e 61 6d 65 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 49 | se($name).....{.........$this->I |
162e0 | 54 5f 61 70 69 5f 54 65 73 74 43 61 73 65 28 24 6e 61 6d 65 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 | T_api_TestCase($name);.....}.... |
16300 | 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 55 70 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 | ..function.setUp().....{........ |
16320 | 20 24 74 68 69 73 2d 3e 74 70 6c 20 3d 26 20 6e 65 77 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 | .$this->tpl.=&.new.HTML_Template |
16340 | 5f 49 54 58 28 27 2e 2f 74 65 6d 70 6c 61 74 65 73 27 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 | _ITX('./templates');.....}...... |
16360 | 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 50 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 73 28 29 | function.testPlaceholderExists() |
16380 | 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 54 65 | .....{.........$this->tpl->setTe |
163a0 | 6d 70 6c 61 74 65 28 27 7b 76 61 72 7d 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e | mplate('{var}');.........$this-> |
163c0 | 61 73 73 65 72 74 54 72 75 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f 6c 64 | assertTrue($this->tpl->placehold |
163e0 | 65 72 45 78 69 73 74 73 28 27 76 61 72 27 29 2c 20 27 45 78 69 73 74 69 6e 67 20 70 6c 61 63 65 | erExists('var'),.'Existing.place |
16400 | 68 6f 6c 64 65 72 20 5c 27 76 61 72 5c 27 20 72 65 70 6f 72 74 65 64 20 61 73 20 6e 6f 6e 65 78 | holder.\'var\'.reported.as.nonex |
16420 | 69 73 74 61 6e 74 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 | istant');.........$this->assertT |
16440 | 72 75 65 28 21 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 | rue(!$this->tpl->placeholderExis |
16460 | 74 73 28 27 66 6f 6f 62 61 72 27 29 2c 20 27 4e 6f 6e 65 78 69 73 74 61 6e 74 20 70 6c 61 63 65 | ts('foobar'),.'Nonexistant.place |
16480 | 68 6f 6c 64 65 72 20 5c 27 66 6f 6f 62 61 72 5c 27 20 72 65 70 6f 72 74 65 64 20 61 73 20 65 78 | holder.\'foobar\'.reported.as.ex |
164a0 | 69 73 74 69 6e 67 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 | isting');.........$this->assertT |
164c0 | 72 75 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 | rue($this->tpl->placeholderExist |
164e0 | 73 28 27 76 61 72 27 2c 20 27 5f 5f 67 6c 6f 62 61 6c 5f 5f 27 29 2c 20 27 45 78 69 73 74 69 6e | s('var',.'__global__'),.'Existin |
16500 | 67 20 69 6e 20 62 6c 6f 63 6b 20 5c 27 5f 5f 67 6c 6f 62 61 6c 5f 5f 5c 27 20 70 6c 61 63 65 68 | g.in.block.\'__global__\'.placeh |
16520 | 6f 6c 64 65 72 20 5c 27 76 61 72 5c 27 20 72 65 70 6f 72 74 65 64 20 61 73 20 6e 6f 6e 65 78 69 | older.\'var\'.reported.as.nonexi |
16540 | 73 74 61 6e 74 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 | stant');.........$this->assertTr |
16560 | 75 65 28 21 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 | ue(!$this->tpl->placeholderExist |
16580 | 73 28 27 66 6f 6f 62 61 72 27 2c 20 27 5f 5f 67 6c 6f 62 61 6c 5f 5f 27 29 2c 20 27 4e 6f 6e 65 | s('foobar',.'__global__'),.'None |
165a0 | 78 69 73 74 61 6e 74 20 69 6e 20 62 6c 6f 63 6b 20 5c 27 5f 5f 67 6c 6f 62 61 6c 5f 5f 5c 27 20 | xistant.in.block.\'__global__\'. |
165c0 | 70 6c 61 63 65 68 6f 6c 64 65 72 20 5c 27 66 6f 6f 62 61 72 5c 27 20 72 65 70 6f 72 74 65 64 20 | placeholder.\'foobar\'.reported. |
165e0 | 61 73 20 65 78 69 73 74 69 6e 67 27 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 66 75 6e 63 74 69 | as.existing');.....}......functi |
16600 | 6f 6e 20 74 65 73 74 42 6c 6f 63 6b 45 78 69 73 74 73 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 | on.testBlockExists().....{...... |
16620 | 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 54 65 6d 70 6c 61 74 65 28 27 7b 76 61 72 | ...$this->tpl->setTemplate('{var |
16640 | 7d 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 24 | }');.........$this->assertTrue($ |
16660 | 74 68 69 73 2d 3e 74 70 6c 2d 3e 62 6c 6f 63 6b 45 78 69 73 74 73 28 27 5f 5f 67 6c 6f 62 61 6c | this->tpl->blockExists('__global |
16680 | 5f 5f 27 29 2c 20 27 45 78 69 73 74 69 6e 67 20 62 6c 6f 63 6b 20 5c 27 5f 5f 67 6c 6f 62 61 6c | __'),.'Existing.block.\'__global |
166a0 | 5f 5f 5c 27 20 72 65 70 6f 72 74 65 64 20 61 73 20 6e 6f 6e 65 78 69 73 74 61 6e 74 27 29 3b 0a | __\'.reported.as.nonexistant');. |
166c0 | 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 21 24 74 68 69 73 | ........$this->assertTrue(!$this |
166e0 | 2d 3e 74 70 6c 2d 3e 62 6c 6f 63 6b 45 78 69 73 74 73 28 27 66 6f 6f 62 61 72 27 29 2c 20 27 4e | ->tpl->blockExists('foobar'),.'N |
16700 | 6f 6e 65 78 69 73 74 61 6e 74 20 62 6c 6f 63 6b 20 5c 27 66 6f 6f 62 61 72 5c 27 20 72 65 70 6f | onexistant.block.\'foobar\'.repo |
16720 | 72 74 65 64 20 61 73 20 65 78 69 73 74 69 6e 67 27 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 66 | rted.as.existing');.....}......f |
16740 | 75 6e 63 74 69 6f 6e 20 74 65 73 74 41 64 64 42 6c 6f 63 6b 28 29 0a 20 20 20 20 7b 0a 20 20 20 | unction.testAddBlock().....{.... |
16760 | 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 | .....$result.=.$this->tpl->loadT |
16780 | 65 6d 70 6c 61 74 65 66 69 6c 65 28 27 62 6c 6f 63 6b 73 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c | emplatefile('blocks.html',.true, |
167a0 | 20 74 72 75 65 29 3b 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f | .true);.........if.(PEAR::isErro |
167c0 | 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | r($result)).{.............$this- |
167e0 | 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e | >assertTrue(false,.'Error.loadin |
16800 | 67 20 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 | g.template.file:.'..$result->get |
16820 | 4d 65 73 73 61 67 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 | Message());.........}.........$t |
16840 | 68 69 73 2d 3e 74 70 6c 2d 3e 61 64 64 42 6c 6f 63 6b 28 27 76 61 72 27 2c 20 27 61 64 64 65 64 | his->tpl->addBlock('var',.'added |
16860 | 27 2c 20 27 61 64 64 65 64 3a 7b 6e 65 77 5f 76 61 72 7d 27 29 3b 0a 20 20 20 20 20 20 20 20 24 | ',.'added:{new_var}');.........$ |
16880 | 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 62 6c 6f | this->assertTrue($this->tpl->blo |
168a0 | 63 6b 45 78 69 73 74 73 28 27 61 64 64 65 64 27 29 2c 20 27 54 68 65 20 6e 65 77 20 62 6c 6f 63 | ckExists('added'),.'The.new.bloc |
168c0 | 6b 20 73 65 65 6d 73 20 74 6f 20 62 65 20 6d 69 73 73 69 6e 67 27 29 3b 0a 20 20 20 20 20 20 20 | k.seems.to.be.missing');........ |
168e0 | 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 21 24 74 68 69 73 2d 3e 74 70 6c 2d 3e | .$this->assertTrue(!$this->tpl-> |
16900 | 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 73 28 27 76 61 72 27 29 2c 20 27 54 68 65 20 6f | placeholderExists('var'),.'The.o |
16920 | 6c 64 20 76 61 72 69 61 62 6c 65 20 73 65 65 6d 73 20 74 6f 20 62 65 20 73 74 69 6c 6c 20 70 72 | ld.variable.seems.to.be.still.pr |
16940 | 65 73 65 6e 74 20 69 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 27 29 3b 0a 20 20 20 20 20 20 20 | esent.in.the.template');........ |
16960 | 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6e 65 77 5f 76 61 | .$this->tpl->setVariable('new_va |
16980 | 72 27 2c 20 27 6e 65 77 5f 76 61 6c 75 65 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | r',.'new_value');.........$this- |
169a0 | 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 61 64 64 65 64 3a 6e 65 77 5f 76 61 6c 75 65 27 2c | >assertEquals('added:new_value', |
169c0 | 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e | .$this->_stripWhitespace($this-> |
169e0 | 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 66 75 6e 63 74 69 6f | tpl->get()));.....}......functio |
16a00 | 6e 20 74 65 73 74 41 64 64 42 6c 6f 63 6b 66 69 6c 65 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 | n.testAddBlockfile().....{...... |
16a20 | 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d | ...$result.=.$this->tpl->loadTem |
16a40 | 70 6c 61 74 65 66 69 6c 65 28 27 62 6c 6f 63 6b 73 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 | platefile('blocks.html',.true,.t |
16a60 | 72 75 65 29 3b 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 | rue);.........if.(PEAR::isError( |
16a80 | 24 72 65 73 75 6c 74 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 | $result)).{.............$this->a |
16aa0 | 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 | ssertTrue(false,.'Error.loading. |
16ac0 | 74 65 6d 70 6c 61 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 | template.file:.'..$result->getMe |
16ae0 | 73 73 61 67 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 72 65 73 | ssage());.........}.........$res |
16b00 | 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 61 64 64 42 6c 6f 63 6b 66 69 6c 65 28 27 | ult.=.$this->tpl->addBlockfile(' |
16b20 | 76 61 72 27 2c 20 27 61 64 64 65 64 27 2c 20 27 61 64 64 62 6c 6f 63 6b 2e 68 74 6d 6c 27 29 3b | var',.'added',.'addblock.html'); |
16b40 | 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 | .........if.(PEAR::isError($resu |
16b60 | 6c 74 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 | lt)).{.............$this->assert |
16b80 | 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 61 64 64 69 6e 67 20 62 6c 6f 63 6b 20 | True(false,.'Error.adding.block. |
16ba0 | 66 72 6f 6d 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 | from.file:.'..$result->getMessag |
16bc0 | 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 | e());.........}.........$this->a |
16be0 | 73 73 65 72 74 54 72 75 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 62 6c 6f 63 6b 45 78 69 73 74 | ssertTrue($this->tpl->blockExist |
16c00 | 73 28 27 61 64 64 65 64 27 29 2c 20 27 54 68 65 20 6e 65 77 20 62 6c 6f 63 6b 20 73 65 65 6d 73 | s('added'),.'The.new.block.seems |
16c20 | 20 74 6f 20 62 65 20 6d 69 73 73 69 6e 67 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | .to.be.missing');.........$this- |
16c40 | 3e 61 73 73 65 72 74 54 72 75 65 28 21 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f | >assertTrue(!$this->tpl->placeho |
16c60 | 6c 64 65 72 45 78 69 73 74 73 28 27 76 61 72 27 29 2c 20 27 54 68 65 20 6f 6c 64 20 76 61 72 69 | lderExists('var'),.'The.old.vari |
16c80 | 61 62 6c 65 20 73 65 65 6d 73 20 74 6f 20 62 65 20 73 74 69 6c 6c 20 70 72 65 73 65 6e 74 20 69 | able.seems.to.be.still.present.i |
16ca0 | 6e 20 74 68 65 20 74 65 6d 70 6c 61 74 65 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d | n.the.template');.........$this- |
16cc0 | 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6e 65 77 5f 76 61 72 27 2c 20 27 6e 65 | >tpl->setVariable('new_var',.'ne |
16ce0 | 77 5f 76 61 6c 75 65 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 | w_value');.........$this->assert |
16d00 | 45 71 75 61 6c 73 28 27 61 64 64 65 64 3a 6e 65 77 5f 76 61 6c 75 65 27 2c 20 24 74 68 69 73 2d | Equals('added:new_value',.$this- |
16d20 | 3e 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 | >_stripWhitespace($this->tpl->ge |
16d40 | 74 28 29 29 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 52 | t()));.....}......function.testR |
16d60 | 65 70 6c 61 63 65 42 6c 6f 63 6b 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 72 65 73 | eplaceBlock().....{.........$res |
16d80 | 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 | ult.=.$this->tpl->loadTemplatefi |
16da0 | 6c 65 28 27 62 6c 6f 63 6b 73 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b 0a 20 | le('blocks.html',.true,.true);.. |
16dc0 | 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 | .......if.(PEAR::isError($result |
16de0 | 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 | )).{.............$this->assertTr |
16e00 | 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 6c 61 74 | ue(false,.'Error.loading.templat |
16e20 | 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 | e.file:.'..$result->getMessage() |
16e40 | 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d | );.........}.........$this->tpl- |
16e60 | 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6f 6c 64 5f 76 61 72 27 2c 20 27 6f 6c 64 5f 76 61 6c | >setVariable('old_var',.'old_val |
16e80 | 75 65 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 | ue');.........$this->tpl->parse( |
16ea0 | 27 6f 6c 64 5f 62 6c 6f 63 6b 27 29 3b 0a 20 20 20 20 20 20 20 20 2f 2f 20 6f 6c 64 5f 62 6c 6f | 'old_block');.........//.old_blo |
16ec0 | 63 6b 27 73 20 63 6f 6e 74 65 6e 74 73 20 73 68 6f 75 6c 64 20 62 65 20 64 69 73 63 61 72 64 65 | ck's.contents.should.be.discarde |
16ee0 | 64 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 72 65 70 6c 61 63 65 42 6c 6f | d.........$this->tpl->replaceBlo |
16f00 | 63 6b 28 27 6f 6c 64 5f 62 6c 6f 63 6b 27 2c 20 27 72 65 70 6c 61 63 65 64 3a 7b 72 65 70 6c 61 | ck('old_block',.'replaced:{repla |
16f20 | 63 65 64 5f 76 61 72 7d 23 27 2c 20 66 61 6c 73 65 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 | ced_var}#',.false);.........$thi |
16f40 | 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 21 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 62 6c 6f 63 6b | s->assertTrue(!$this->tpl->block |
16f60 | 45 78 69 73 74 73 28 27 6f 6c 64 5f 69 6e 6e 65 72 5f 62 6c 6f 63 6b 27 29 20 26 26 20 21 24 74 | Exists('old_inner_block').&&.!$t |
16f80 | 68 69 73 2d 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 73 28 27 6f 6c 64 | his->tpl->placeholderExists('old |
16fa0 | 5f 76 61 72 27 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | _var'),......................... |
16fc0 | 20 20 27 54 68 65 20 72 65 70 6c 61 63 65 64 20 62 6c 6f 63 6b 5c 27 73 20 63 6f 6e 74 65 6e 74 | ..'The.replaced.block\'s.content |
16fe0 | 73 20 73 65 65 6d 20 74 6f 20 62 65 20 73 74 69 6c 6c 20 70 72 65 73 65 6e 74 27 29 3b 0a 20 20 | s.seem.to.be.still.present');... |
17000 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 72 | ......$this->tpl->setVariable('r |
17020 | 65 70 6c 61 63 65 64 5f 76 61 72 27 2c 20 27 72 65 70 6c 61 63 65 64 5f 76 61 6c 75 65 27 29 3b | eplaced_var',.'replaced_value'); |
17040 | 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 27 6f 6c 64 5f | .........$this->tpl->parse('old_ |
17060 | 62 6c 6f 63 6b 27 29 3b 0a 20 20 20 20 20 20 20 20 2f 2f 20 74 68 69 73 20 74 69 6d 65 20 6f 6c | block');.........//.this.time.ol |
17080 | 64 5f 62 6c 6f 63 6b 27 73 20 63 6f 6e 74 65 6e 74 73 20 73 68 6f 75 6c 64 20 62 65 20 70 72 65 | d_block's.contents.should.be.pre |
170a0 | 73 65 72 76 65 64 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 72 65 70 6c 61 | served.........$this->tpl->repla |
170c0 | 63 65 42 6c 6f 63 6b 28 27 6f 6c 64 5f 62 6c 6f 63 6b 27 2c 20 27 72 65 70 6c 61 63 65 64 5f 61 | ceBlock('old_block',.'replaced_a |
170e0 | 67 61 69 6e 3a 7b 62 72 61 6e 64 5f 6e 65 77 5f 76 61 72 7d 27 2c 20 74 72 75 65 29 3b 0a 20 20 | gain:{brand_new_var}',.true);... |
17100 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 62 | ......$this->tpl->setVariable('b |
17120 | 72 61 6e 64 5f 6e 65 77 5f 76 61 72 27 2c 20 27 62 72 61 6e 64 5f 6e 65 77 5f 76 61 6c 75 65 27 | rand_new_var',.'brand_new_value' |
17140 | 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 | );.........$this->assertEquals(' |
17160 | 72 65 70 6c 61 63 65 64 3a 72 65 70 6c 61 63 65 64 5f 76 61 6c 75 65 23 72 65 70 6c 61 63 65 64 | replaced:replaced_value#replaced |
17180 | 5f 61 67 61 69 6e 3a 62 72 61 6e 64 5f 6e 65 77 5f 76 61 6c 75 65 27 2c 20 24 74 68 69 73 2d 3e | _again:brand_new_value',.$this-> |
171a0 | 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 | _stripWhitespace($this->tpl->get |
171c0 | 28 29 29 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 74 65 73 74 52 65 | ()));.....}......function.testRe |
171e0 | 70 6c 61 63 65 42 6c 6f 63 6b 66 69 6c 65 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 24 | placeBlockfile().....{.........$ |
17200 | 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 | result.=.$this->tpl->loadTemplat |
17220 | 65 66 69 6c 65 28 27 62 6c 6f 63 6b 73 2e 68 74 6d 6c 27 2c 20 74 72 75 65 2c 20 74 72 75 65 29 | efile('blocks.html',.true,.true) |
17240 | 3b 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 | ;.........if.(PEAR::isError($res |
17260 | 75 6c 74 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 | ult)).{.............$this->asser |
17280 | 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 6c 6f 61 64 69 6e 67 20 74 65 6d 70 | tTrue(false,.'Error.loading.temp |
172a0 | 6c 61 74 65 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 | late.file:.'..$result->getMessag |
172c0 | 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 | e());.........}.........$this->t |
172e0 | 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 27 6f 6c 64 5f 76 61 72 27 2c 20 27 6f 6c 64 5f | pl->setVariable('old_var',.'old_ |
17300 | 76 61 6c 75 65 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 | value');.........$this->tpl->par |
17320 | 73 65 28 27 6f 6c 64 5f 62 6c 6f 63 6b 27 29 3b 0a 20 20 20 20 20 20 20 20 2f 2f 20 6f 6c 64 5f | se('old_block');.........//.old_ |
17340 | 62 6c 6f 63 6b 27 73 20 63 6f 6e 74 65 6e 74 73 20 73 68 6f 75 6c 64 20 62 65 20 64 69 73 63 61 | block's.contents.should.be.disca |
17360 | 72 64 65 64 0a 20 20 20 20 20 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 | rded.........$result.=.$this->tp |
17380 | 6c 2d 3e 72 65 70 6c 61 63 65 42 6c 6f 63 6b 66 69 6c 65 28 27 6f 6c 64 5f 62 6c 6f 63 6b 27 2c | l->replaceBlockfile('old_block', |
173a0 | 20 27 72 65 70 6c 61 63 65 62 6c 6f 63 6b 2e 68 74 6d 6c 27 2c 20 66 61 6c 73 65 29 3b 0a 20 20 | .'replaceblock.html',.false);... |
173c0 | 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 | ......if.(PEAR::isError($result) |
173e0 | 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 | ).{.............$this->assertTru |
17400 | 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 20 72 65 70 6c 61 63 69 6e 67 20 62 6c 6f 63 6b 20 | e(false,.'Error.replacing.block. |
17420 | 66 72 6f 6d 20 66 69 6c 65 3a 20 27 2e 20 24 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 | from.file:.'..$result->getMessag |
17440 | 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 | e());.........}.........$this->a |
17460 | 73 73 65 72 74 54 72 75 65 28 21 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 62 6c 6f 63 6b 45 78 69 73 | ssertTrue(!$this->tpl->blockExis |
17480 | 74 73 28 27 6f 6c 64 5f 69 6e 6e 65 72 5f 62 6c 6f 63 6b 27 29 20 26 26 20 21 24 74 68 69 73 2d | ts('old_inner_block').&&.!$this- |
174a0 | 3e 74 70 6c 2d 3e 70 6c 61 63 65 68 6f 6c 64 65 72 45 78 69 73 74 73 28 27 6f 6c 64 5f 76 61 72 | >tpl->placeholderExists('old_var |
174c0 | 27 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 27 54 | '),...........................'T |
174e0 | 68 65 20 72 65 70 6c 61 63 65 64 20 62 6c 6f 63 6b 5c 27 73 20 63 6f 6e 74 65 6e 74 73 20 73 65 | he.replaced.block\'s.contents.se |
17500 | 65 6d 20 74 6f 20 62 65 20 73 74 69 6c 6c 20 70 72 65 73 65 6e 74 27 29 3b 0a 20 20 20 20 20 20 | em.to.be.still.present');....... |
17520 | 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 61 72 72 61 79 28 | ..$this->tpl->setVariable(array( |
17540 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 27 72 65 70 6c 61 63 65 64 5f 76 61 72 27 20 20 20 20 20 | .............'replaced_var'..... |
17560 | 20 20 3d 3e 20 27 72 65 70 6c 61 63 65 64 5f 76 61 6c 75 65 27 2c 0a 20 20 20 20 20 20 20 20 20 | ..=>.'replaced_value',.......... |
17580 | 20 20 20 27 72 65 70 6c 61 63 65 64 5f 69 6e 6e 65 72 5f 76 61 72 27 20 3d 3e 20 27 69 6e 6e 65 | ...'replaced_inner_var'.=>.'inne |
175a0 | 72 5f 76 61 6c 75 65 27 0a 20 20 20 20 20 20 20 20 29 29 3b 0a 20 20 20 20 20 20 20 20 24 74 68 | r_value'.........));.........$th |
175c0 | 69 73 2d 3e 74 70 6c 2d 3e 70 61 72 73 65 28 27 6f 6c 64 5f 62 6c 6f 63 6b 27 29 3b 0a 20 20 20 | is->tpl->parse('old_block');.... |
175e0 | 20 20 20 20 20 2f 2f 20 74 68 69 73 20 74 69 6d 65 20 6f 6c 64 5f 62 6c 6f 63 6b 27 73 20 63 6f | .....//.this.time.old_block's.co |
17600 | 6e 74 65 6e 74 73 20 73 68 6f 75 6c 64 20 62 65 20 70 72 65 73 65 72 76 65 64 0a 20 20 20 20 20 | ntents.should.be.preserved...... |
17620 | 20 20 20 24 72 65 73 75 6c 74 20 3d 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 72 65 70 6c 61 63 65 | ...$result.=.$this->tpl->replace |
17640 | 42 6c 6f 63 6b 66 69 6c 65 28 27 6f 6c 64 5f 62 6c 6f 63 6b 27 2c 20 27 61 64 64 62 6c 6f 63 6b | Blockfile('old_block',.'addblock |
17660 | 2e 68 74 6d 6c 27 2c 20 74 72 75 65 29 3b 0a 20 20 20 20 20 20 20 20 69 66 20 28 50 45 41 52 3a | .html',.true);.........if.(PEAR: |
17680 | 3a 69 73 45 72 72 6f 72 28 24 72 65 73 75 6c 74 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 | :isError($result)).{............ |
176a0 | 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 45 72 72 6f 72 | .$this->assertTrue(false,.'Error |
176c0 | 20 72 65 70 6c 61 63 69 6e 67 20 62 6c 6f 63 6b 20 66 72 6f 6d 20 66 69 6c 65 3a 20 27 2e 20 24 | .replacing.block.from.file:.'..$ |
176e0 | 72 65 73 75 6c 74 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d | result->getMessage());.........} |
17700 | 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 | .........$this->tpl->setVariable |
17720 | 28 27 6e 65 77 5f 76 61 72 27 2c 20 27 61 67 61 69 6e 27 29 3b 0a 20 20 20 20 20 20 20 20 24 74 | ('new_var',.'again');.........$t |
17740 | 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 72 65 70 6c 61 63 65 64 3a 72 65 70 6c | his->assertEquals('replaced:repl |
17760 | 61 63 65 64 5f 76 61 6c 75 65 7c 69 6e 6e 65 72 5f 76 61 6c 75 65 23 61 64 64 65 64 3a 61 67 61 | aced_value|inner_value#added:aga |
17780 | 69 6e 27 2c 20 24 74 68 69 73 2d 3e 5f 73 74 72 69 70 57 68 69 74 65 73 70 61 63 65 28 24 74 68 | in',.$this->_stripWhitespace($th |
177a0 | 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 29 3b 0a 20 20 20 20 7d 0a 0a 20 20 20 20 66 75 6e | is->tpl->get()));.....}......fun |
177c0 | 63 74 69 6f 6e 20 74 65 73 74 43 61 6c 6c 62 61 63 6b 28 29 0a 20 20 20 20 7b 0a 20 20 20 20 20 | ction.testCallback().....{...... |
177e0 | 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 54 65 6d 70 6c 61 74 65 28 27 63 61 6c 6c | ...$this->tpl->setTemplate('call |
17800 | 62 61 63 6b 3a 66 75 6e 63 5f 75 70 70 65 72 63 61 73 65 28 77 6f 72 64 29 27 29 3b 0a 20 20 20 | back:func_uppercase(word)');.... |
17820 | 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 73 65 74 43 61 6c 6c 62 61 63 6b 46 75 6e 63 | .....$this->tpl->setCallbackFunc |
17840 | 74 69 6f 6e 28 27 75 70 70 65 72 63 61 73 65 27 2c 20 27 5f 75 70 70 65 72 63 61 73 65 43 61 6c | tion('uppercase',.'_uppercaseCal |
17860 | 6c 62 61 63 6b 27 29 3b 0a 20 20 20 20 20 20 20 20 24 72 65 73 20 3d 20 24 74 68 69 73 2d 3e 74 | lback');.........$res.=.$this->t |
17880 | 70 6c 2d 3e 70 65 72 66 6f 72 6d 43 61 6c 6c 62 61 63 6b 28 29 3b 0a 20 20 20 20 20 20 20 20 69 | pl->performCallback();.........i |
178a0 | 66 20 28 50 45 41 52 3a 3a 69 73 45 72 72 6f 72 28 24 72 65 73 29 29 20 7b 0a 20 20 20 20 20 20 | f.(PEAR::isError($res)).{....... |
178c0 | 20 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 54 72 75 65 28 66 61 6c 73 65 2c 20 27 | ......$this->assertTrue(false,.' |
178e0 | 45 72 72 6f 72 20 70 65 72 66 6f 72 6d 69 6e 67 20 63 61 6c 6c 62 61 63 6b 3a 20 27 2e 20 24 72 | Error.performing.callback:.'..$r |
17900 | 65 73 2d 3e 67 65 74 4d 65 73 73 61 67 65 28 29 29 3b 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 | es->getMessage());.........}.... |
17920 | 20 20 20 20 20 24 74 68 69 73 2d 3e 61 73 73 65 72 74 45 71 75 61 6c 73 28 27 63 61 6c 6c 62 61 | .....$this->assertEquals('callba |
17940 | 63 6b 3a 57 4f 52 44 27 2c 20 24 74 68 69 73 2d 3e 74 70 6c 2d 3e 67 65 74 28 29 29 3b 0a 20 20 | ck:WORD',.$this->tpl->get());... |
17960 | 20 20 7d 0a 7d 0a 0a 3f 3e 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ..}.}..?>....................... |
17980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
179a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
179c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
179e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 49 54 58 5f 75 | HTML_Template_IT-1.1/tests/ITX_u |
17a20 | 73 61 67 65 5f 74 65 73 74 63 61 73 65 2e 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | sage_testcase.php............... |
17a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
17a80 | 20 20 20 20 34 36 31 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 30 34 36 20 00 00 00 00 00 | ....461..7633514211..15046...... |
17aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c00 | 3c 3f 70 68 70 0d 0a 0d 0a 72 65 71 75 69 72 65 5f 6f 6e 63 65 20 27 49 54 5f 75 73 61 67 65 5f | <?php....require_once.'IT_usage_ |
17c20 | 74 65 73 74 63 61 73 65 2e 70 68 70 27 3b 0d 0a 0d 0a 63 6c 61 73 73 20 49 54 58 5f 75 73 61 67 | testcase.php';....class.ITX_usag |
17c40 | 65 5f 74 65 73 74 63 61 73 65 20 65 78 74 65 6e 64 73 20 49 54 5f 75 73 61 67 65 5f 74 65 73 74 | e_testcase.extends.IT_usage_test |
17c60 | 63 61 73 65 0d 0a 7b 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 49 54 58 5f 55 73 61 67 65 5f | case..{......function.ITX_Usage_ |
17c80 | 54 65 73 74 43 61 73 65 28 24 6e 61 6d 65 29 0d 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 | TestCase($name)......{.......... |
17ca0 | 24 74 68 69 73 2d 3e 49 54 5f 55 73 61 67 65 5f 54 65 73 74 43 61 73 65 28 24 6e 61 6d 65 29 3b | $this->IT_Usage_TestCase($name); |
17cc0 | 0d 0a 20 20 20 20 7d 0d 0a 0d 0a 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 73 65 74 55 70 28 29 0d | ......}........function.setUp(). |
17ce0 | 0a 20 20 20 20 7b 0d 0a 20 20 20 20 20 20 20 20 24 74 68 69 73 2d 3e 74 70 6c 20 3d 26 20 6e 65 | .....{..........$this->tpl.=&.ne |
17d00 | 77 20 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 58 28 27 2e 2f 74 65 6d 70 6c 61 74 65 73 | w.HTML_Template_ITX('./templates |
17d20 | 27 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 3f 3e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ');......}..}..?>............... |
17d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 74 65 73 74 73 2f 74 65 73 74 2e | HTML_Template_IT-1.1/tests/test. |
17e20 | 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | php............................. |
17e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
17e80 | 20 20 20 31 33 37 32 20 20 37 36 33 33 36 34 37 31 35 37 20 20 31 32 33 34 34 20 00 00 00 00 00 | ...1372..7633647157..12344...... |
17ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18000 | 3c 3f 70 68 70 0d 0a 24 74 65 73 74 63 61 73 65 73 20 3d 20 61 72 72 61 79 28 0d 0a 20 20 20 20 | <?php..$testcases.=.array(...... |
18020 | 27 49 54 58 5f 61 70 69 5f 74 65 73 74 63 61 73 65 27 2c 0d 0a 20 20 20 20 27 49 54 58 5f 75 73 | 'ITX_api_testcase',......'ITX_us |
18040 | 61 67 65 5f 74 65 73 74 63 61 73 65 27 0d 0a 29 3b 0d 0a 2f 2f 20 75 73 65 20 74 68 65 73 65 20 | age_testcase'..);..//.use.these. |
18060 | 69 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 63 68 65 63 6b 20 6f 6e 6c 79 20 62 61 73 65 20 48 | if.you.want.to.check.only.base.H |
18080 | 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 0d 0a 69 | TML_Template_IT.functionality..i |
180a0 | 66 28 66 61 6c 73 65 29 0d 0a 24 74 65 73 74 63 61 73 65 73 20 3d 20 61 72 72 61 79 28 0d 0a 20 | f(false)..$testcases.=.array(... |
180c0 | 20 20 20 27 49 54 5f 61 70 69 5f 74 65 73 74 63 61 73 65 27 2c 0d 0a 20 20 20 20 27 49 54 5f 75 | ...'IT_api_testcase',......'IT_u |
180e0 | 73 61 67 65 5f 74 65 73 74 63 61 73 65 27 0d 0a 29 3b 0d 0a 0d 0a 72 65 71 75 69 72 65 5f 6f 6e | sage_testcase'..);....require_on |
18100 | 63 65 20 27 50 48 50 55 6e 69 74 2f 54 65 73 74 53 75 69 74 65 2e 70 68 70 27 3b 0d 0a 72 65 71 | ce.'PHPUnit/TestSuite.php';..req |
18120 | 75 69 72 65 5f 6f 6e 63 65 20 27 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 65 2f 49 54 58 2e 70 68 70 | uire_once.'HTML/Template/ITX.php |
18140 | 27 3b 0d 0a 0d 0a 24 73 75 69 74 65 20 3d 26 20 6e 65 77 20 50 48 50 55 6e 69 74 5f 54 65 73 74 | ';....$suite.=&.new.PHPUnit_Test |
18160 | 53 75 69 74 65 28 29 3b 0d 0a 0d 0a 66 6f 72 65 61 63 68 20 28 24 74 65 73 74 63 61 73 65 73 20 | Suite();....foreach.($testcases. |
18180 | 61 73 20 24 74 65 73 74 63 61 73 65 29 20 7b 0d 0a 20 20 20 20 69 6e 63 6c 75 64 65 5f 6f 6e 63 | as.$testcase).{......include_onc |
181a0 | 65 20 24 74 65 73 74 63 61 73 65 20 2e 20 27 2e 70 68 70 27 3b 0d 0a 20 20 20 20 24 6d 65 74 68 | e.$testcase...'.php';......$meth |
181c0 | 6f 64 73 20 3d 20 70 72 65 67 5f 67 72 65 70 28 27 2f 5e 74 65 73 74 2f 27 2c 20 67 65 74 5f 63 | ods.=.preg_grep('/^test/',.get_c |
181e0 | 6c 61 73 73 5f 6d 65 74 68 6f 64 73 28 24 74 65 73 74 63 61 73 65 29 29 3b 0d 0a 20 20 20 20 66 | lass_methods($testcase));......f |
18200 | 6f 72 65 61 63 68 20 28 24 6d 65 74 68 6f 64 73 20 61 73 20 24 6d 65 74 68 6f 64 29 20 7b 0d 0a | oreach.($methods.as.$method).{.. |
18220 | 20 20 20 20 20 20 20 20 24 73 75 69 74 65 2d 3e 61 64 64 54 65 73 74 28 6e 65 77 20 24 74 65 73 | ........$suite->addTest(new.$tes |
18240 | 74 63 61 73 65 28 24 6d 65 74 68 6f 64 29 29 3b 0d 0a 20 20 20 20 7d 0d 0a 7d 0d 0a 0d 0a 72 65 | tcase($method));......}..}....re |
18260 | 71 75 69 72 65 5f 6f 6e 63 65 20 27 43 6f 6e 73 6f 6c 65 5f 54 65 73 74 4c 69 73 74 65 6e 65 72 | quire_once.'Console_TestListener |
18280 | 2e 70 68 70 27 3b 0d 0a 24 72 65 73 75 6c 74 20 3d 26 20 6e 65 77 20 50 48 50 55 6e 69 74 5f 54 | .php';..$result.=&.new.PHPUnit_T |
182a0 | 65 73 74 52 65 73 75 6c 74 28 29 3b 0d 0a 24 72 65 73 75 6c 74 2d 3e 61 64 64 4c 69 73 74 65 6e | estResult();..$result->addListen |
182c0 | 65 72 28 6e 65 77 20 43 6f 6e 73 6f 6c 65 5f 54 65 73 74 4c 69 73 74 65 6e 65 72 29 3b 0d 0a 24 | er(new.Console_TestListener);..$ |
182e0 | 73 75 69 74 65 2d 3e 72 75 6e 28 24 72 65 73 75 6c 74 29 3b 0d 0a 3f 3e 0d 0a 00 00 00 00 00 00 | suite->run($result);..?>........ |
18300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
183a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
183c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
183e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18400 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 65 78 61 6d 70 6c 65 73 2f 73 61 | HTML_Template_IT-1.1/examples/sa |
18420 | 6d 70 6c 65 5f 69 74 2e 70 68 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | mple_it.php..................... |
18440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18460 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
18480 | 20 20 20 31 32 34 37 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 33 37 37 37 20 00 00 00 00 00 | ...1247..7633514211..13777...... |
184a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
184c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
184e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
185a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
185c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
185e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18600 | 3c 3f 70 68 70 0a 72 65 71 75 69 72 65 5f 6f 6e 63 65 20 22 48 54 4d 4c 2f 54 65 6d 70 6c 61 74 | <?php.require_once."HTML/Templat |
18620 | 65 2f 49 54 2e 70 68 70 22 3b 0a 0a 24 64 61 74 61 20 3d 20 61 72 72 61 79 20 28 0a 20 20 20 20 | e/IT.php";..$data.=.array.(..... |
18640 | 22 30 22 20 3d 3e 20 61 72 72 61 79 28 22 53 74 69 67 22 2c 20 22 42 61 6b 6b 65 6e 22 29 2c 0a | "0".=>.array("Stig",."Bakken"),. |
18660 | 20 20 20 20 22 31 22 20 3d 3e 20 61 72 72 61 79 28 22 4d 61 72 74 69 6e 22 2c 20 22 4a 61 6e 73 | ...."1".=>.array("Martin",."Jans |
18680 | 65 6e 22 29 2c 0a 20 20 20 20 22 32 22 20 3d 3e 20 61 72 72 61 79 28 22 41 6c 65 78 61 6e 64 65 | en"),....."2".=>.array("Alexande |
186a0 | 72 22 2c 20 22 4d 65 72 7a 22 29 0a 29 3b 0a 0a 24 74 70 6c 20 3d 20 6e 65 77 20 48 54 4d 4c 5f | r",."Merz").);..$tpl.=.new.HTML_ |
186c0 | 54 65 6d 70 6c 61 74 65 5f 49 54 28 22 2e 2f 74 65 6d 70 6c 61 74 65 73 22 29 3b 0a 0a 24 74 70 | Template_IT("./templates");..$tp |
186e0 | 6c 2d 3e 6c 6f 61 64 54 65 6d 70 6c 61 74 65 66 69 6c 65 28 22 6d 61 69 6e 2e 74 70 6c 2e 68 74 | l->loadTemplatefile("main.tpl.ht |
18700 | 6d 22 2c 20 74 72 75 65 2c 20 74 72 75 65 29 3b 0a 0a 66 6f 72 65 61 63 68 28 24 64 61 74 61 20 | m",.true,.true);..foreach($data. |
18720 | 61 73 20 24 6e 61 6d 65 29 20 7b 0a 20 20 20 20 66 6f 72 65 61 63 68 28 24 6e 61 6d 65 20 61 73 | as.$name).{.....foreach($name.as |
18740 | 20 24 63 65 6c 6c 29 20 7b 0a 20 20 20 20 20 20 20 20 2f 2f 20 41 73 73 69 67 6e 20 64 61 74 61 | .$cell).{.........//.Assign.data |
18760 | 20 74 6f 20 74 68 65 20 69 6e 6e 65 72 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 24 74 70 6c | .to.the.inner.block.........$tpl |
18780 | 2d 3e 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 22 63 65 6c 6c 22 29 20 3b 0a 20 20 20 20 | ->setCurrentBlock("cell").;..... |
187a0 | 20 20 20 20 24 74 70 6c 2d 3e 73 65 74 56 61 72 69 61 62 6c 65 28 22 44 41 54 41 22 2c 20 24 63 | ....$tpl->setVariable("DATA",.$c |
187c0 | 65 6c 6c 29 20 3b 0a 20 20 20 20 20 20 20 20 24 74 70 6c 2d 3e 70 61 72 73 65 43 75 72 72 65 6e | ell).;.........$tpl->parseCurren |
187e0 | 74 42 6c 6f 63 6b 28 22 63 65 6c 6c 22 29 20 3b 0a 20 20 20 20 7d 0a 20 20 20 20 2f 2f 20 41 73 | tBlock("cell").;.....}.....//.As |
18800 | 73 69 67 6e 20 64 61 74 61 20 61 6e 64 20 74 68 65 20 69 6e 6e 65 72 20 62 6c 6f 63 6b 20 74 6f | sign.data.and.the.inner.block.to |
18820 | 20 74 68 65 0a 20 20 20 20 2f 2f 20 6f 75 74 65 72 20 62 6c 6f 63 6b 0a 20 20 20 20 24 74 70 6c | .the.....//.outer.block.....$tpl |
18840 | 2d 3e 73 65 74 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 22 72 6f 77 22 29 20 3b 0a 20 20 20 20 24 | ->setCurrentBlock("row").;.....$ |
18860 | 74 70 6c 2d 3e 70 61 72 73 65 43 75 72 72 65 6e 74 42 6c 6f 63 6b 28 22 72 6f 77 22 29 20 3b 0a | tpl->parseCurrentBlock("row").;. |
18880 | 7d 0a 2f 2f 20 70 72 69 6e 74 20 74 68 65 20 6f 75 74 70 75 74 0a 24 74 70 6c 2d 3e 73 68 6f 77 | }.//.print.the.output.$tpl->show |
188a0 | 28 29 3b 0a 3f 3e 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ();.?>.......................... |
188c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
188e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
189a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
189c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
189e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a00 | 48 54 4d 4c 5f 54 65 6d 70 6c 61 74 65 5f 49 54 2d 31 2e 31 2f 65 78 61 6d 70 6c 65 73 2f 74 65 | HTML_Template_IT-1.1/examples/te |
18a20 | 6d 70 6c 61 74 65 73 2f 6d 61 69 6e 2e 74 70 6c 2e 68 74 6d 00 00 00 00 00 00 00 00 00 00 00 00 | mplates/main.tpl.htm............ |
18a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a60 | 00 00 00 00 31 30 30 36 34 34 20 00 20 20 20 37 36 34 20 00 20 20 20 20 36 30 20 00 20 20 20 20 | ....100644.....764......60...... |
18a80 | 20 20 20 20 32 33 36 20 20 37 36 33 33 35 31 34 32 31 31 20 20 31 35 35 32 30 20 00 00 00 00 00 | ....236..7633514211..15520...... |
18aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18c00 | 3c 68 74 6d 6c 3e 0a 20 3c 74 61 62 6c 65 20 62 6f 72 64 65 72 3e 0a 3c 21 2d 2d 20 42 45 47 49 | <html>..<table.border>.<!--.BEGI |
18c20 | 4e 20 72 6f 77 20 2d 2d 3e 0a 20 20 3c 74 72 3e 0a 3c 21 2d 2d 20 42 45 47 49 4e 20 63 65 6c 6c | N.row.-->...<tr>.<!--.BEGIN.cell |
18c40 | 20 2d 2d 3e 0a 20 20 20 3c 74 64 3e 0a 20 20 20 20 7b 44 41 54 41 7d 0a 20 20 20 3c 2f 74 64 3e | .-->....<td>.....{DATA}....</td> |
18c60 | 0a 3c 21 2d 2d 20 45 4e 44 20 63 65 6c 6c 20 2d 2d 3e 0a 20 20 3c 2f 74 72 3e 0a 3c 21 2d 2d 20 | .<!--.END.cell.-->...</tr>.<!--. |
18c80 | 45 4e 44 20 72 6f 77 20 2d 2d 3e 0a 20 3c 2f 74 61 62 6c 65 3e 0a 3c 2f 68 74 6d 6c 3e 0a 00 00 | END.row.-->..</table>.</html>... |
18ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |