Skip to content

Commit

Permalink
chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr-ru committed Apr 5, 2017
1 parent c9a668e commit 3376548
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/recursion.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head>
<title>TemplateObject &ndash; recursion TEST</title>
</head>
<body>
<body>
<p>Refresh page to see different results</p>
<hr>

<ul>
<!-- BEGIN block -->
<li>
Expand All @@ -14,7 +17,12 @@
</li>
<!-- END block -->
</ul>

<hr>
<p>Refresh page to see different results</p>

<!-- BEGIN block2 -->
[block-2]
<!-- RECURSION block2 -->
<!-- END block2 -->
</body>
</html>
2 changes: 2 additions & 0 deletions tests/recursion.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
define('MAX_LEVEL', 5);
recursion($to);

$to->setBlock('block2')->setBlock('block2')->setBlock('block2');

$to->showOutput();

function recursion(&$tmpl, $level = 0)
Expand Down

0 comments on commit 3376548

Please sign in to comment.