diff --git a/phpBB/common.php b/phpBB/common.php index 7694620b36..81fe275008 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -124,8 +124,7 @@ $phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_ro // Initialize style $phpbb_style_resource_locator = new phpbb_style_resource_locator(); $phpbb_style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider()); - -$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator); +$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator); $phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_subscriber_loader = new phpbb_event_extension_subscriber_loader($phpbb_dispatcher, $phpbb_extension_manager); diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 3adf9582d6..fde917e5b1 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -134,7 +134,7 @@ class bbcode $style_resource_locator = new phpbb_style_resource_locator(); $style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider()); - $template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator); + $template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator); $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $template); $style->set_style(); $template->set_filenames(array('bbcode.html' => 'bbcode.html')); diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index de14703817..e9073553d0 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -210,8 +210,7 @@ class messenger { $style_resource_locator = new phpbb_style_resource_locator(); $style_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider()); - - $tpl = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator); + $tpl = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator); $style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $style_resource_locator, $style_path_provider, $tpl); $this->tpl_msg[$template_lang . $template_file] = $tpl; diff --git a/phpBB/includes/style/style.php b/phpBB/includes/style/style.php index 4bfb9eaa07..2be4cb8855 100644 --- a/phpBB/includes/style/style.php +++ b/phpBB/includes/style/style.php @@ -22,7 +22,7 @@ if (!defined('IN_PHPBB')) class phpbb_style { /** - * @var phpbb_style_template Template class. + * @var phpbb_template Template class. * Handles everything related to templates. */ private $template; @@ -66,9 +66,9 @@ class phpbb_style * @param user $user current user * @param phpbb_style_resource_locator $locator style resource locator * @param phpbb_style_path_provider $provider style path provider - * @param phpbb_style_template $template template + * @param phpbb_template $template template */ - public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider, phpbb_style_template $template) + public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_resource_locator $locator, phpbb_style_path_provider_interface $provider, phpbb_template $template) { $this->phpbb_root_path = $phpbb_root_path; $this->phpEx = $phpEx; diff --git a/phpBB/includes/template/context.php b/phpBB/includes/template/context.php index 5e0b1d4a7e..ec09da1cf3 100644 --- a/phpBB/includes/template/context.php +++ b/phpBB/includes/template/context.php @@ -86,7 +86,7 @@ class phpbb_template_context * Returns a reference to template data array. * * This function is public so that template renderer may invoke it. - * Users should alter template variables via functions in phpbb_style_template. + * Users should alter template variables via functions in phpbb_template. * * Note: modifying returned array will affect data stored in the context. * diff --git a/phpBB/includes/template/renderer_eval.php b/phpBB/includes/template/renderer_eval.php index 62dfbc3708..f8e4cb7b10 100644 --- a/phpBB/includes/template/renderer_eval.php +++ b/phpBB/includes/template/renderer_eval.php @@ -33,7 +33,7 @@ class phpbb_template_renderer_eval implements phpbb_template_renderer * Template includes are delegated to template object $template. * * @param string $code php code of the template - * @param phpbb_style_template $template template object + * @param phpbb_template $template template object */ public function __construct($code, $template) { diff --git a/phpBB/includes/style/template.php b/phpBB/includes/template/template.php similarity index 99% rename from phpBB/includes/style/template.php rename to phpBB/includes/template/template.php index 6dd588c17b..0a3e992b03 100644 --- a/phpBB/includes/style/template.php +++ b/phpBB/includes/template/template.php @@ -29,7 +29,7 @@ if (!defined('IN_PHPBB')) * Base Template class. * @package phpBB3 */ -class phpbb_style_template +class phpbb_template { /** * @var phpbb_template_context Template context. diff --git a/phpBB/install/index.php b/phpBB/install/index.php index be5ebc53b5..f992b67bb7 100644 --- a/phpBB/install/index.php +++ b/phpBB/install/index.php @@ -202,7 +202,7 @@ $config = new phpbb_config(array( $phpbb_style_resource_locator = new phpbb_style_resource_locator(); $phpbb_style_path_provider = new phpbb_style_path_provider(); -$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator); +$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator); $phpbb_style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_resource_locator, $phpbb_style_path_provider, $template); $phpbb_style->set_ext_dir_prefix('adm/'); $phpbb_style->set_custom_style('admin', '../adm/style', ''); diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index 4170fdf278..d660aa3f56 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -66,7 +66,7 @@ class phpbb_template_template_test_case extends phpbb_test_case $this->template_path = dirname(__FILE__) . '/templates'; $this->style_resource_locator = new phpbb_style_resource_locator(); $this->style_provider = new phpbb_style_path_provider(); - $this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator); + $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator); $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template); $this->style->set_custom_style('tests', $this->template_path, ''); } diff --git a/tests/template/template_test_case_with_tree.php b/tests/template/template_test_case_with_tree.php index 536ac394a8..9522c97330 100644 --- a/tests/template/template_test_case_with_tree.php +++ b/tests/template/template_test_case_with_tree.php @@ -22,7 +22,7 @@ class phpbb_template_template_test_case_with_tree extends phpbb_template_templat $this->parent_template_path = dirname(__FILE__) . '/parent_templates'; $this->style_resource_locator = new phpbb_style_resource_locator(); $this->style_provider = new phpbb_style_path_provider(); - $this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator); + $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator); $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, $this->style_resource_locator, $this->style_provider, $this->template); $this->style->set_custom_style('tests', array($this->template_path, $this->parent_template_path), ''); }