aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-05-08 04:03:41 -0400
committerOleg Pudeyev <oleg@bsdpower.com>2011-05-08 04:03:41 -0400
commit84bc485ccc426b87e21c8db627a3019eee7497dd (patch)
tree2f550038a93fc903835ac188804cbaa5ed1f74e7 /phpBB
parent1cba674b9a04390ff754bdb34691b3654f5916f9 (diff)
downloadforums-84bc485ccc426b87e21c8db627a3019eee7497dd.tar
forums-84bc485ccc426b87e21c8db627a3019eee7497dd.tar.gz
forums-84bc485ccc426b87e21c8db627a3019eee7497dd.tar.bz2
forums-84bc485ccc426b87e21c8db627a3019eee7497dd.tar.xz
forums-84bc485ccc426b87e21c8db627a3019eee7497dd.zip
[feature/template-engine] Renamed template executor and friends to renderer.
PHPBB3-9726
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/template.php34
-rw-r--r--phpBB/includes/template_renderer.php (renamed from phpBB/includes/template_executor.php)12
-rw-r--r--phpBB/includes/template_renderer_eval.php (renamed from phpBB/includes/template_executor_eval.php)10
-rw-r--r--phpBB/includes/template_renderer_include.php (renamed from phpBB/includes/template_executor_include.php)10
4 files changed, 33 insertions, 33 deletions
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 02815c4e15..f27d0c7560 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -206,11 +206,11 @@ class phpbb_template
}
*/
- $executor = $this->_tpl_load($handle);
+ $renderer = $this->_tpl_load($handle);
- if ($executor)
+ if ($renderer)
{
- $executor->execute($this->_context, $this->get_lang());
+ $renderer->render($this->_context, $this->get_lang());
return true;
}
else
@@ -270,8 +270,8 @@ class phpbb_template
}
/**
- * Obtains a template executor for a template identified by specified
- * handle. THe template executor can execute the template later.
+ * Obtains a template renderer for a template identified by specified
+ * handle. The template renderer can display the template later.
*
* Template source will first be compiled into php code.
* If template cache is writable the compiled php code will be stored
@@ -281,15 +281,15 @@ class phpbb_template
* configuration setting may be used to force templates to be always
* recompiled.
*
- * Returns an object implementing phpbb_template_executor, or null
- * if template loading or compilation failed. Call execute() on the
- * executor to execute the template. This will result in template
+ * Returns an object implementing phpbb_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).
*
* @access private
* @param string $handle Handle of the template to load
- * @return phpbb_template_executor Template executor object, or null on failure
+ * @return phpbb_template_renderer Template renderer object, or null on failure
* @uses template_compile is used to compile template source
*/
private function _tpl_load($handle)
@@ -333,7 +333,7 @@ class phpbb_template
// Recompile page if the original template is newer, otherwise load the compiled version
if (!$recompile)
{
- return new phpbb_template_executor_include($filename, $this);
+ return new phpbb_template_renderer_include($filename, $this);
}
// Inheritance - we point to another template file for this one.
@@ -350,18 +350,18 @@ class phpbb_template
$output_file = $this->_compiled_file_for_handle($handle);
if ($compile->compile_file_to_file($source_file, $output_file) !== false)
{
- $executor = new phpbb_template_executor_include($output_file, $this);
+ $renderer = new phpbb_template_renderer_include($output_file, $this);
}
else if (($code = $compile->compile_file($source_file)) !== false)
{
- $executor = new phpbb_template_executor_eval($code, $this);
+ $renderer = new phpbb_template_renderer_eval($code, $this);
}
else
{
- $executor = null;
+ $renderer = null;
}
- return $executor;
+ return $renderer;
}
/**
@@ -489,11 +489,11 @@ class phpbb_template
$this->files_inherit[$handle] = $this->inherit_root . '/' . $filename;
}
- $executor = $this->_tpl_load($handle);
+ $renderer = $this->_tpl_load($handle);
- if ($executor)
+ if ($renderer)
{
- $executor->execute($this->_context, $this->get_lang());
+ $renderer->render($this->_context, $this->get_lang());
}
else
{
diff --git a/phpBB/includes/template_executor.php b/phpBB/includes/template_renderer.php
index 0d410679b9..0af2d94bb6 100644
--- a/phpBB/includes/template_executor.php
+++ b/phpBB/includes/template_renderer.php
@@ -17,19 +17,19 @@ if (!defined('IN_PHPBB'))
}
/**
-* Template executor interface.
+* Template renderer interface.
*
-* Objects implementing this interface encapsulate a means of executing
-* (i.e. rendering) a template.
+* Objects implementing this interface encapsulate a means of displaying
+* a template.
*
* @package phpBB3
*/
-interface phpbb_template_executor
+interface phpbb_template_renderer
{
/**
- * Executes the template managed by this executor.
+ * Displays the template managed by this renderer.
* @param phpbb_template_context $context Template context to use
* @param array $lang Language entries to use
*/
- public function execute($context, $lang);
+ public function render($context, $lang);
}
diff --git a/phpBB/includes/template_executor_eval.php b/phpBB/includes/template_renderer_eval.php
index 79142edb04..a3d7f88fa5 100644
--- a/phpBB/includes/template_executor_eval.php
+++ b/phpBB/includes/template_renderer_eval.php
@@ -17,12 +17,12 @@ if (!defined('IN_PHPBB'))
}
/**
-* Template executor that stores compiled template's php code and
-* evaluates it via eval.
+* Template renderer that stores compiled template's php code and
+* displays it via eval.
*
* @package phpBB3
*/
-class phpbb_template_executor_eval implements phpbb_template_executor
+class phpbb_template_renderer_eval implements phpbb_template_renderer
{
/**
* Template code to be eval'ed.
@@ -43,12 +43,12 @@ class phpbb_template_executor_eval implements phpbb_template_executor
}
/**
- * Executes the template managed by this executor by eval'ing php code
+ * 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 array $lang Language entries to use
*/
- public function execute($context, $lang)
+ public function render($context, $lang)
{
$_template = &$this->template;
$_tpldata = &$context->get_data_ref();
diff --git a/phpBB/includes/template_executor_include.php b/phpBB/includes/template_renderer_include.php
index aacabc61e4..aca3a3634d 100644
--- a/phpBB/includes/template_executor_include.php
+++ b/phpBB/includes/template_renderer_include.php
@@ -18,12 +18,12 @@ if (!defined('IN_PHPBB'))
/**
-* Template executor that stores path to php file with template code
-* and evaluates it by including the file.
+* Template renderer that stores path to php file with template code
+* and displays it by including the file.
*
* @package phpBB3
*/
-class phpbb_template_executor_include implements phpbb_template_executor
+class phpbb_template_renderer_include implements phpbb_template_renderer
{
/**
* Template path to be included.
@@ -43,12 +43,12 @@ class phpbb_template_executor_include implements phpbb_template_executor
}
/**
- * Executes the template managed by this executor by including
+ * 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 array $lang Language entries to use
*/
- public function execute($context, $lang)
+ public function render($context, $lang)
{
$_template = &$this->template;
$_tpldata = &$context->get_data_ref();