[ticket/11667] Make functions abstract in includeasset

Also comment properly

PHPBB3-11667
This commit is contained in:
Nathaniel Guse 2013-07-12 13:32:40 -05:00
parent 1d55709e13
commit 41d8bfa974
3 changed files with 35 additions and 8 deletions

View file

@ -62,4 +62,19 @@ abstract class phpbb_template_twig_node_includeasset extends Twig_Node
->raw("\n');\n")
;
}
/**
* Get the definition name
*
* @return string (e.g. 'SCRIPTS')
*/
abstract public function get_definition_name();
/**
* Append the output code for the asset
*
* @param Twig_Compiler A Twig_Compiler instance
* @return null
*/
abstract protected function append_asset(Twig_Compiler $compiler);
}

View file

@ -9,15 +9,21 @@
class phpbb_template_twig_node_includecss extends phpbb_template_twig_node_includeasset
{
/**
* Get the definition name
*
* @return string (e.g. 'SCRIPTS')
*/
public function get_definition_name()
{
return 'STYLESHEETS';
}
/**
* Compiles the node to PHP.
* Append the output code for the asset
*
* @param Twig_Compiler A Twig_Compiler instance
* @return null
*/
public function append_asset(Twig_Compiler $compiler)
{

View file

@ -9,15 +9,21 @@
class phpbb_template_twig_node_includejs extends phpbb_template_twig_node_includeasset
{
/**
* Get the definition name
*
* @return string (e.g. 'SCRIPTS')
*/
public function get_definition_name()
{
return 'SCRIPTS';
}
/**
* Compiles the node to PHP.
* Append the output code for the asset
*
* @param Twig_Compiler A Twig_Compiler instance
* @return null
*/
protected function append_asset(Twig_Compiler $compiler)
{