protected function compileTemplate(Twig_Compiler $compiler) {
if (!$this
->getAttribute('index')) {
$compiler
->write('<?php');
}
$this
->compileClassHeader($compiler);
if (count($this
->getNode('blocks')) || count($this
->getNode('traits')) || null === $this
->getNode('parent') || $this
->getNode('parent') instanceof Twig_Node_Expression_Constant) {
$this
->compileConstructor($compiler);
}
$this
->compileGetParent($compiler);
$this
->compileDisplayHeader($compiler);
$this
->compileDisplayBody($compiler);
$this
->compileDisplayFooter($compiler);
$compiler
->subcompile($this
->getNode('blocks'));
$this
->compileMacros($compiler);
$this
->compileGetTemplateName($compiler);
$this
->compileIsTraitable($compiler);
$this
->compileDebugInfo($compiler);
$this
->compileClassFooter($compiler);
}