1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 18:54:08 +02:00

[feature/controller] Implement a front controller

PHPBB3-10864
This commit is contained in:
David King
2012-10-19 19:54:19 -04:00
parent 65dde648ca
commit 06158693c7
23 changed files with 818 additions and 59 deletions

View File

@@ -224,15 +224,9 @@ class phpbb_template
*/
public function assign_display($handle, $template_var = '', $return_content = true)
{
ob_start();
$result = $this->display($handle);
$contents = ob_get_clean();
if ($result === false)
{
return false;
}
$contents = $this->return_display($handle);
if ($return_content)
if ($return_content === true || empty($template_var) || $contents === false)
{
return $contents;
}
@@ -242,6 +236,15 @@ class phpbb_template
return true;
}
public function return_display($handle)
{
ob_start();
$result = $this->display($handle);
$contents = ob_get_clean();
return $result === false ? $result : $contents;
}
/**
* Obtains a template renderer for a template identified by specified
* handle. The template renderer can display the template later.