diff options
Diffstat (limited to 'phpBB/includes/template_executor_include.php')
-rw-r--r-- | phpBB/includes/template_executor_include.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/phpBB/includes/template_executor_include.php b/phpBB/includes/template_executor_include.php new file mode 100644 index 0000000000..74f0593b13 --- /dev/null +++ b/phpBB/includes/template_executor_include.php @@ -0,0 +1,32 @@ +<?php + +/** +* Template executor that stores path to php file with template code +* and evaluates it by including the file. +*/ +class phpbb_template_executor_include implements phpbb_template_executor +{ + /** + * Template path to be included. + */ + private $path; + + /** + * Constructor. Stores path to the template for future inclusion. + * + * @param string $path path to the template + */ + public function __construct($path) + { + $this->path = $path; + } + + /** + * Executes the template managed by this executor by including + * the php file containing the template. + */ + public function execute() + { + include($this->path); + } +} |