예제 #1
0
 public function compile(Compiler $compiler)
 {
     $compiler->scopeIn(Compiler::SCOPE_ROOT);
     $name = $this->getAttribute(self::ATTR_NAME);
     $compiler->write('<?php')->line()->write('class ' . $compiler->getEnvironment()->getTemplateClass($name) . ' extends Azera\\Fry\\Template {' . "\n")->line()->indent();
     $this->renderTemplateName($compiler);
     $this->renderParentFunction($compiler);
     $this->renderBody($compiler);
     $this->renderBlocks($compiler);
     $this->renderMacros($compiler);
     $compiler->outdent()->line()->write('}');
     $compiler->scopeOut();
 }