Docs - walk
07/31/2010: SUIT 2.0.1 and Rulebox 1.1.0 released.
Available Since: SUIT (2.0.0)
Walk through the tree and generate the string.
The generated string.
Hello, <strong>[var]username[/var]</strong>!
<?php
require 'suit.class.php';
require 'templating.class.php';
$suit = new SUIT();
$templating = new Templating($suit);
$templating->var->username = 'Brandon';
$tokens = $suit->tokens($templating->rules, $template);
$tree = $suit->parse($templating->rules, $tokens, $template);
echo $suit->walk($templating->rules, $tree);
// Result: Hello, <strong>Brandon</strong>!
?>
import suit
from rulebox import templating
templating.var.username = 'Brandon'
tokens = suit.tokens(templating.rules, template)
tree = suit.parse(templating.rules, tokens, template)
print suit.walk(templating.rules, tree)
# Result: Hello, <strong>Brandon</strong>!





