blob: 27bdf95b52e22ed425c41d5ca864390641a3b6f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php
/**
* Template executor that stores compiled template's php code and
* evaluates it via eval.
*/
class phpbb_template_executor_eval implements phpbb_template_executor
{
/**
* Template code to be eval'ed.
*/
private $code;
/**
* Constructor. Stores provided code for future evaluation.
*
* @param string $code php code of the template
*/
public function __construct($code)
{
$this->code = $code;
}
/**
* Executes the template managed by this executor by eval'ing php code
* of the template.
*/
public function execute()
{
eval($this->code);
}
}
|