mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\template\twig;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -15,12 +17,12 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
class phpbb_template_twig_environment extends Twig_Environment
|
||||
class environment extends \Twig_Environment
|
||||
{
|
||||
/** @var array */
|
||||
protected $phpbb_extensions;
|
||||
|
||||
/** @var phpbb_config */
|
||||
/** @var \phpbb\config\config */
|
||||
protected $phpbb_config;
|
||||
|
||||
/** @var string */
|
||||
@@ -32,13 +34,13 @@ class phpbb_template_twig_environment extends Twig_Environment
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param phpbb_config $phpbb_config
|
||||
* @param \phpbb\config\config $phpbb_config
|
||||
* @param array $phpbb_extensions Array of enabled extensions (name => path)
|
||||
* @param string $phpbb_root_path
|
||||
* @param Twig_LoaderInterface $loader
|
||||
* @param array $options Array of options to pass to Twig
|
||||
*/
|
||||
public function __construct($phpbb_config, $phpbb_extensions, $phpbb_root_path, Twig_LoaderInterface $loader = null, $options = array())
|
||||
public function __construct($phpbb_config, $phpbb_extensions, $phpbb_root_path, \Twig_LoaderInterface $loader = null, $options = array())
|
||||
{
|
||||
$this->phpbb_config = $phpbb_config;
|
||||
$this->phpbb_extensions = $phpbb_extensions;
|
||||
@@ -62,7 +64,7 @@ class phpbb_template_twig_environment extends Twig_Environment
|
||||
/**
|
||||
* Get phpBB config
|
||||
*
|
||||
* @return phpbb_config
|
||||
* @return \phpbb\config\config
|
||||
*/
|
||||
public function get_phpbb_config()
|
||||
{
|
||||
@@ -124,7 +126,7 @@ class phpbb_template_twig_environment extends Twig_Environment
|
||||
|
||||
return parent::loadTemplate('@' . $namespace . '/' . $name, $index);
|
||||
}
|
||||
catch (Twig_Error_Loader $e)
|
||||
catch (\Twig_Error_Loader $e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user