$compiler->subcompile($this->blocks);
- $this->compileGetName($compiler);
-
$this->compileMacros($compiler);
$this->compileClassFooter($compiler);
;
}
- protected function compileGetName($compiler)
- {
- $compiler
- ->write("public function getName()\n", "{\n")
- ->indent()
- ->write('return ')
- ->string($this['filename'])
- ->raw(";\n")
- ->outdent()
- ->write("}\n\n")
- ;
- }
-
protected function compileDisplayFooter($compiler)
{
$compiler
return ob_get_clean();
}
-
- abstract protected function getName();
}
* @covers Twig_Node_Module::compileDisplayHeader
* @covers Twig_Node_Module::compileDisplayBody
* @covers Twig_Node_Module::compileDisplayFooter
- * @covers Twig_Node_Module::compileGetName
* @covers Twig_Node_Module::compileClassFooter
* @dataProvider getTests
*/
echo "foo";
}
- public function getName()
- {
- return "foo.twig";
- }
-
}
EOF
, $twig);
\$this->parent->display(\$context);
}
- public function getName()
- {
- return "foo.twig";
- }
-
}
EOF
, $twig);
\$this->parent->display(\$context);
}
- public function getName()
- {
- return "foo.twig";
- }
-
}
EOF
, $twig);
);
}
- public function getName()
- {
- return "foo.twig";
- }
-
}
EOF
, $twig);
\$this->parent->checkSecurity();
}
- public function getName()
- {
- return "foo.twig";
- }
-
}
EOF
, $twig);