diff --git a/phpBB/common.php b/phpBB/common.php
index b308037a0e..a38a986280 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -120,9 +120,9 @@ set_config_count(null, null, null, $config);
// load extensions
$phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_root_path, ".$phpEx", $cache->get_driver());
-$phpbb_template_locator = new phpbb_template_locator();
-$phpbb_template_path_provider = new phpbb_template_extension_path_provider($phpbb_extension_manager, new phpbb_template_path_provider());
-$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_template_locator, $phpbb_template_path_provider);
+$phpbb_style_locator = new phpbb_style_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_locator, $phpbb_style_path_provider);
// Add own hook handler
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 60274a308d..61271545bd 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -132,9 +132,9 @@ class bbcode
{
$this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']);
- $template_locator = new phpbb_template_locator();
- $template_path_provider = new phpbb_template_extension_path_provider($phpbb_extension_manager, new phpbb_template_path_provider());
- $template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $template_locator, $template_path_provider);
+ $template_locator = new phpbb_style_locator();
+ $template_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, $template_locator, $template_path_provider);
$template->set_template();
$template_locator->set_filenames(array('bbcode.html' => 'bbcode.html'));
$this->template_filename = $template_locator->get_source_file_for_handle('bbcode.html');
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index f4e49b1b18..1fb5f15879 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -208,9 +208,9 @@ class messenger
// tpl_msg now holds a template object we can use to parse the template file
if (!isset($this->tpl_msg[$template_lang . $template_file]))
{
- $template_locator = new phpbb_template_locator();
- $template_path_provider = new phpbb_template_extension_path_provider($phpbb_extension_manager, new phpbb_template_path_provider());
- $this->tpl_msg[$template_lang . $template_file] = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $template_locator, $template_path_provider);
+ $template_locator = new phpbb_style_locator();
+ $template_path_provider = new phpbb_style_extension_path_provider($phpbb_extension_manager, new phpbb_style_path_provider());
+ $this->tpl_msg[$template_lang . $template_file] = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $template_locator, $template_path_provider);
$tpl = &$this->tpl_msg[$template_lang . $template_file];
$fallback_template_path = false;
diff --git a/phpBB/includes/style/extension_path_provider.php b/phpBB/includes/style/extension_path_provider.php
index 2897f60ac1..05dc5661f6 100644
--- a/phpBB/includes/style/extension_path_provider.php
+++ b/phpBB/includes/style/extension_path_provider.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_template_extension_path_provider extends phpbb_extension_provider implements phpbb_template_path_provider_interface
+class phpbb_style_extension_path_provider extends phpbb_extension_provider implements phpbb_style_path_provider_interface
{
/**
* Optional prefix for template paths searched within extensions.
@@ -36,7 +36,7 @@ class phpbb_template_extension_path_provider extends phpbb_extension_provider im
/**
* A provider of paths to be searched for templates
- * @var phpbb_template_path_provider
+ * @var phpbb_style_path_provider
*/
protected $base_path_provider;
@@ -44,10 +44,10 @@ class phpbb_template_extension_path_provider extends phpbb_extension_provider im
* Constructor stores extension manager
*
* @param phpbb_extension_manager $extension_manager phpBB extension manager
- * @param phpbb_template_path_provider $base_path_provider A simple path provider
+ * @param phpbb_style_path_provider $base_path_provider A simple path provider
* to provide paths to be located in extensions
*/
- public function __construct(phpbb_extension_manager $extension_manager, phpbb_template_path_provider $base_path_provider)
+ public function __construct(phpbb_extension_manager $extension_manager, phpbb_style_path_provider $base_path_provider)
{
parent::__construct($extension_manager);
$this->base_path_provider = $base_path_provider;
diff --git a/phpBB/includes/style/locator.php b/phpBB/includes/style/locator.php
index d4502d7984..2d0bcce924 100644
--- a/phpBB/includes/style/locator.php
+++ b/phpBB/includes/style/locator.php
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_template_locator
+class phpbb_style_locator
{
/**
* Paths to directories that templates are stored in.
diff --git a/phpBB/includes/style/path_provider.php b/phpBB/includes/style/path_provider.php
index b0b545973d..649797df41 100644
--- a/phpBB/includes/style/path_provider.php
+++ b/phpBB/includes/style/path_provider.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_template_path_provider implements IteratorAggregate, phpbb_template_path_provider_interface
+class phpbb_style_path_provider implements IteratorAggregate, phpbb_style_path_provider_interface
{
protected $main_template_name = '';
protected $paths = array();
diff --git a/phpBB/includes/style/path_provider_interface.php b/phpBB/includes/style/path_provider_interface.php
index 8b3a406d2a..e65c037dcc 100644
--- a/phpBB/includes/style/path_provider_interface.php
+++ b/phpBB/includes/style/path_provider_interface.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-interface phpbb_template_path_provider_interface extends Traversable
+interface phpbb_style_path_provider_interface extends Traversable
{
/**
* Defines a prefix to use for template paths in extensions
diff --git a/phpBB/includes/style/template.php b/phpBB/includes/style/template.php
index bac5445511..a8c5139dd0 100644
--- a/phpBB/includes/style/template.php
+++ b/phpBB/includes/style/template.php
@@ -29,10 +29,10 @@ if (!defined('IN_PHPBB'))
* Base Template class.
* @package phpBB3
*/
-class phpbb_template
+class phpbb_style_template
{
/**
- * @var phpbb_template_context Template context.
+ * @var phpbb_style_template_context Template context.
* Stores template data used during template rendering.
*/
private $context;
@@ -64,13 +64,13 @@ class phpbb_template
/**
* Template locator
- * @var phpbb_template_locator
+ * @var phpbb_style_locator
*/
private $locator;
/**
* Template path provider
- * @var phpbb_template_path_provider
+ * @var phpbb_style_path_provider
*/
private $provider;
@@ -79,10 +79,10 @@ class phpbb_template
*
* @param string $phpbb_root_path phpBB root path
* @param user $user current user
- * @param phpbb_template_locator $locator template locator
- * @param phpbb_template_path_provider $provider template path provider
+ * @param phpbb_style_locator $locator template locator
+ * @param phpbb_style_path_provider $provider template path provider
*/
- public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_template_locator $locator, phpbb_template_path_provider_interface $provider)
+ public function __construct($phpbb_root_path, $phpEx, $config, $user, phpbb_style_locator $locator, phpbb_style_path_provider_interface $provider)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx;
@@ -139,7 +139,7 @@ class phpbb_template
$this->cachepath = $this->phpbb_root_path . 'cache/tpl_' . str_replace('_', '-', $template_name) . '_';
- $this->context = new phpbb_template_context();
+ $this->context = new phpbb_style_template_context();
return true;
}
@@ -298,15 +298,15 @@ class phpbb_template
* configuration setting may be used to force templates to be always
* recompiled.
*
- * Returns an object implementing phpbb_template_renderer, or null
+ * Returns an object implementing phpbb_style_template_renderer, or null
* if template loading or compilation failed. Call render() on the
* renderer to display the template. This will result in template
* contents sent to the output stream (unless, of course, output
* buffering is in effect).
*
* @param string $handle Handle of the template to load
- * @return phpbb_template_renderer Template renderer object, or null on failure
- * @uses phpbb_template_compile is used to compile template source
+ * @return phpbb_style_template_renderer Template renderer object, or null on failure
+ * @uses phpbb_style_template_compile is used to compile template source
*/
private function _tpl_load($handle)
{
@@ -330,18 +330,18 @@ class phpbb_template
// Recompile page if the original template is newer, otherwise load the compiled version
if (!$recompile)
{
- return new phpbb_template_renderer_include($output_file, $this);
+ return new phpbb_style_template_renderer_include($output_file, $this);
}
- $compile = new phpbb_template_compile($this->config['tpl_allow_php']);
+ $compile = new phpbb_style_template_compile($this->config['tpl_allow_php']);
if ($compile->compile_file_to_file($source_file, $output_file) !== false)
{
- $renderer = new phpbb_template_renderer_include($output_file, $this);
+ $renderer = new phpbb_style_template_renderer_include($output_file, $this);
}
else if (($code = $compile->compile_file($source_file)) !== false)
{
- $renderer = new phpbb_template_renderer_eval($code, $this);
+ $renderer = new phpbb_style_template_renderer_eval($code, $this);
}
else
{
@@ -403,7 +403,7 @@ class phpbb_template
$this->context->append_var($varname, $varval);
}
- // Docstring is copied from phpbb_template_context method with the same name.
+ // Docstring is copied from phpbb_style_template_context method with the same name.
/**
* Assign key variable pairs from an array to a specified block
* @param string $blockname Name of block to assign $vararray to
@@ -414,7 +414,7 @@ class phpbb_template
return $this->context->assign_block_vars($blockname, $vararray);
}
- // Docstring is copied from phpbb_template_context method with the same name.
+ // Docstring is copied from phpbb_style_template_context method with the same name.
/**
* Change already assigned key variable pair (one-dimensional - single loop entry)
*
diff --git a/phpBB/includes/style/template_compile.php b/phpBB/includes/style/template_compile.php
index b0009421c5..3ef3fffc00 100644
--- a/phpBB/includes/style/template_compile.php
+++ b/phpBB/includes/style/template_compile.php
@@ -15,7 +15,7 @@ if (!defined('IN_PHPBB'))
exit;
}
-stream_filter_register('phpbb_template', 'phpbb_template_filter');
+stream_filter_register('phpbb_template', 'phpbb_style_template_filter');
/**
* Extension of template class - Functions needed for compiling templates only.
@@ -23,7 +23,7 @@ stream_filter_register('phpbb_template', 'phpbb_template_filter');
* @package phpBB3
* @uses template_filter As a PHP stream filter to perform compilation of templates
*/
-class phpbb_template_compile
+class phpbb_style_template_compile
{
/**
* Whether tags are allowed
diff --git a/phpBB/includes/style/template_context.php b/phpBB/includes/style/template_context.php
index ec09da1cf3..b22f77da2e 100644
--- a/phpBB/includes/style/template_context.php
+++ b/phpBB/includes/style/template_context.php
@@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_template_context
+class phpbb_style_template_context
{
/**
* variable that holds all the data we'll be substituting into
@@ -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_template.
+ * Users should alter template variables via functions in phpbb_style_template.
*
* Note: modifying returned array will affect data stored in the context.
*
diff --git a/phpBB/includes/style/template_filter.php b/phpBB/includes/style/template_filter.php
index f55c8d7e9c..04fe85e07f 100644
--- a/phpBB/includes/style/template_filter.php
+++ b/phpBB/includes/style/template_filter.php
@@ -35,7 +35,7 @@ if (!defined('IN_PHPBB'))
* @see template_compile
* @package phpBB3
*/
-class phpbb_template_filter extends php_user_filter
+class phpbb_style_template_filter extends php_user_filter
{
const REGEX_NS = '[a-z_][a-z_0-9]+';
diff --git a/phpBB/includes/style/template_renderer.php b/phpBB/includes/style/template_renderer.php
index 30e234a733..bd2a786e86 100644
--- a/phpBB/includes/style/template_renderer.php
+++ b/phpBB/includes/style/template_renderer.php
@@ -23,12 +23,12 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-interface phpbb_template_renderer
+interface phpbb_style_template_renderer
{
/**
* Displays the template managed by this renderer.
*
- * @param phpbb_template_context $context Template context to use
+ * @param phpbb_style_template_context $context Template context to use
* @param array $lang Language entries to use
*/
public function render($context, $lang);
diff --git a/phpBB/includes/style/template_renderer_eval.php b/phpBB/includes/style/template_renderer_eval.php
index f8e4cb7b10..3e08b06e69 100644
--- a/phpBB/includes/style/template_renderer_eval.php
+++ b/phpBB/includes/style/template_renderer_eval.php
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_template_renderer_eval implements phpbb_template_renderer
+class phpbb_style_template_renderer_eval implements phpbb_style_template_renderer
{
/**
* Template code to be eval'ed.
@@ -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_template $template template object
+ * @param phpbb_style_template $template template object
*/
public function __construct($code, $template)
{
@@ -45,7 +45,7 @@ class phpbb_template_renderer_eval implements phpbb_template_renderer
* Displays the template managed by this renderer by eval'ing php code
* of the template.
*
- * @param phpbb_template_context $context Template context to use
+ * @param phpbb_style_template_context $context Template context to use
* @param array $lang Language entries to use
*/
public function render($context, $lang)
diff --git a/phpBB/includes/style/template_renderer_include.php b/phpBB/includes/style/template_renderer_include.php
index f5c9026abf..91c1a1bb65 100644
--- a/phpBB/includes/style/template_renderer_include.php
+++ b/phpBB/includes/style/template_renderer_include.php
@@ -22,7 +22,7 @@ if (!defined('IN_PHPBB'))
*
* @package phpBB3
*/
-class phpbb_template_renderer_include implements phpbb_template_renderer
+class phpbb_style_template_renderer_include implements phpbb_style_template_renderer
{
/**
* Template path to be included.
@@ -45,7 +45,7 @@ class phpbb_template_renderer_include implements phpbb_template_renderer
* Displays the template managed by this renderer by including
* the php file containing the template.
*
- * @param phpbb_template_context $context Template context to use
+ * @param phpbb_style_template_context $context Template context to use
* @param array $lang Language entries to use
*/
public function render($context, $lang)
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 9d003ba6ab..9b0dde1009 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -201,9 +201,9 @@ $config = new phpbb_config(array(
'load_tplcompile' => '1'
));
-$phpbb_template_locator = new phpbb_template_locator();
-$phpbb_template_path_provider = new phpbb_template_path_provider();
-$template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_template_locator, $phpbb_template_path_provider);
+$phpbb_style_locator = new phpbb_style_locator();
+$phpbb_style_path_provider = new phpbb_style_path_provider();
+$template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $phpbb_style_locator, $phpbb_style_path_provider);
$template->set_ext_dir_prefix('adm/');
$template->set_custom_template('../adm/style', 'admin');
$template->assign_var('T_ASSETS_PATH', '../assets');
diff --git a/tests/template/renderer_eval_test.php b/tests/template/renderer_eval_test.php
index 7ebb8b9bda..9b4f74c824 100644
--- a/tests/template/renderer_eval_test.php
+++ b/tests/template/renderer_eval_test.php
@@ -13,8 +13,8 @@ class phpbb_template_renderer_eval_test extends phpbb_test_case
{
$compiled_code = '';
$valid_code = '';
- $context = new phpbb_template_context();
- $template = new phpbb_template_renderer_eval($compiled_code, NULL);
+ $context = new phpbb_style_template_context();
+ $template = new phpbb_style_template_renderer_eval($compiled_code, NULL);
ob_start();
try
{
diff --git a/tests/template/template_compile_test.php b/tests/template/template_compile_test.php
index a5e8a5e87a..fb158cabd5 100644
--- a/tests/template/template_compile_test.php
+++ b/tests/template/template_compile_test.php
@@ -16,7 +16,7 @@ class phpbb_template_template_compile_test extends phpbb_test_case
protected function setUp()
{
- $this->template_compile = new phpbb_template_compile(false);
+ $this->template_compile = new phpbb_style_template_compile(false);
$this->template_path = dirname(__FILE__) . '/templates';
}
diff --git a/tests/template/template_inheritance_test.php b/tests/template/template_inheritance_test.php
index 6987ae6c73..e2a2ac2261 100644
--- a/tests/template/template_inheritance_test.php
+++ b/tests/template/template_inheritance_test.php
@@ -71,9 +71,9 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
$this->template_path = dirname(__FILE__) . '/templates';
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
- $this->template_locator = new phpbb_template_locator();
- $this->template_provider = new phpbb_template_path_provider();
- $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
+ $this->template_locator = new phpbb_style_locator();
+ $this->template_provider = new phpbb_style_path_provider();
+ $this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
$this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path, 'parent');
}
}
diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php
index 5b60785fee..8eea11e84f 100644
--- a/tests/template/template_test_case.php
+++ b/tests/template/template_test_case.php
@@ -63,9 +63,9 @@ class phpbb_template_template_test_case extends phpbb_test_case
$config = new phpbb_config(array_merge($defaults, $new_config));
$this->template_path = dirname(__FILE__) . '/templates';
- $this->template_locator = new phpbb_template_locator();
- $this->template_provider = new phpbb_template_path_provider();
- $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
+ $this->template_locator = new phpbb_style_locator();
+ $this->template_provider = new phpbb_style_path_provider();
+ $this->template = new phpbb_style_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
$this->template->set_custom_template($this->template_path, 'tests');
}