예제 #1
0
 private function compileTemplate($template)
 {
     if (!isset($this->compiler)) {
         $this->initializeCompiler();
     }
     $templateSource = $this->getSource($template);
     $stream = $this->tokenizer->tokenize($templateSource);
     $node = $this->parser->parseTemplate($stream, $template);
     $this->nodeTreeTraverser->traverse($node);
     return $this->compiler->compile($node);
 }