diff options
Diffstat (limited to 'phpBB/phpbb/template/twig/node/includeasset.php')
-rw-r--r-- | phpBB/phpbb/template/twig/node/includeasset.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/phpBB/phpbb/template/twig/node/includeasset.php b/phpBB/phpbb/template/twig/node/includeasset.php index f6c9dc9c58..324823b8d7 100644 --- a/phpBB/phpbb/template/twig/node/includeasset.php +++ b/phpBB/phpbb/template/twig/node/includeasset.php @@ -1,9 +1,13 @@ <?php /** * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -11,7 +15,7 @@ namespace phpbb\template\twig\node; abstract class includeasset extends \Twig_Node { - /** @var Twig_Environment */ + /** @var \Twig_Environment */ protected $environment; public function __construct(\Twig_Node_Expression $expr, \phpbb\template\twig\environment $environment, $lineno, $tag = null) @@ -21,10 +25,10 @@ abstract class includeasset extends \Twig_Node parent::__construct(array('expr' => $expr), array(), $lineno, $tag); } /** - * Compiles the node to PHP. - * - * @param Twig_Compiler A Twig_Compiler instance - */ + * Compiles the node to PHP. + * + * @param \Twig_Compiler A Twig_Compiler instance + */ public function compile(\Twig_Compiler $compiler) { $compiler->addDebugInfo($this); @@ -35,7 +39,7 @@ abstract class includeasset extends \Twig_Node ->write("\$asset_file = ") ->subcompile($this->getNode('expr')) ->raw(";\n") - ->write("\$asset = new \phpbb\\template\\asset(\$asset_file, \$this->getEnvironment()->get_path_helper());\n") + ->write("\$asset = new \phpbb\\template\\asset(\$asset_file, \$this->getEnvironment()->get_path_helper(), \$this->getEnvironment()->get_filesystem());\n") ->write("if (substr(\$asset_file, 0, 2) !== './' && \$asset->is_relative()) {\n") ->indent() ->write("\$asset_path = \$asset->get_path();") @@ -70,7 +74,7 @@ abstract class includeasset extends \Twig_Node /** * Append the output code for the asset * - * @param Twig_Compiler A Twig_Compiler instance + * @param \Twig_Compiler A Twig_Compiler instance * @return null */ abstract protected function append_asset(\Twig_Compiler $compiler); |