コード例 #1
0
ファイル: Compiler.php プロジェクト: skrz/templating-engine
 protected function walkTemplate(TemplateNode $template)
 {
     $ret = "";
     foreach ($template->getStatements() as $statement) {
         $ret .= $this->walk($statement);
     }
     return $ret;
 }
コード例 #2
0
 protected function walkTemplate(TemplateNode $template)
 {
     $this->walkEach($template->getStatements());
 }
コード例 #3
0
 protected function walkTemplate(TemplateNode $template)
 {
     return new TemplateNode($template->getContext(), $this->walkEach($template->getStatements()));
 }
コード例 #4
0
 protected function walkTemplate(TemplateNode $template)
 {
     $variableNames = array();
     foreach ($template->getContext()->getVariableNames() as $name) {
         $variableNames[$name] = true;
     }
     foreach ($template->getStatements() as $statement) {
         foreach ($this->walk($statement) as $name => $_) {
             $variableNames[$name] = true;
         }
     }
     return $variableNames;
 }