diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-07 15:10:50 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-05-07 17:47:02 -0400 |
| commit | 0501640d5db158a010741e27803191ab469834c4 (patch) | |
| tree | aef714b410a540c3c9572753aa6874676c4df29a /phpBB/includes/template_executor_include.php | |
| parent | d8122df3329214f8710c8af3c0ce1ed86505e810 (diff) | |
| download | forums-0501640d5db158a010741e27803191ab469834c4.tar forums-0501640d5db158a010741e27803191ab469834c4.tar.gz forums-0501640d5db158a010741e27803191ab469834c4.tar.bz2 forums-0501640d5db158a010741e27803191ab469834c4.tar.xz forums-0501640d5db158a010741e27803191ab469834c4.zip | |
[feature/template-engine] Added phpbb_template_context class.
Objects of this class hold variables assigned to templates.
PHPBB3-9726
Diffstat (limited to 'phpBB/includes/template_executor_include.php')
| -rw-r--r-- | phpBB/includes/template_executor_include.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/phpBB/includes/template_executor_include.php b/phpBB/includes/template_executor_include.php index 74f0593b13..3671265cca 100644 --- a/phpBB/includes/template_executor_include.php +++ b/phpBB/includes/template_executor_include.php @@ -13,20 +13,29 @@ class phpbb_template_executor_include implements phpbb_template_executor /** * Constructor. Stores path to the template for future inclusion. + * Template includes are delegated to template object $template. * * @param string $path path to the template */ - public function __construct($path) + public function __construct($path, $template) { $this->path = $path; + $this->template = $template; } /** * Executes the template managed by this executor 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() + public function execute($context, $lang) { + $_template = &$this->template; + $_tpldata = &$context->get_data_ref(); + $_rootref = &$context->get_root_ref(); + $_lang = &$lang; + include($this->path); } } |
