1 | <?php |
||
22 | class PhpEngine implements EngineInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var string[] |
||
26 | */ |
||
27 | private $paths; |
||
28 | |||
29 | public function __construct() |
||
33 | |||
34 | /** |
||
35 | * Add a template directory to look for template files inside. |
||
36 | * |
||
37 | * @param string $path The path to a template directory to load templates from. |
||
38 | * @return boolean |
||
39 | */ |
||
40 | public function addPath($path) |
||
46 | |||
47 | /** |
||
48 | * Render the given template name and return the result as a string. |
||
49 | * |
||
50 | * @param string $templateName The name of the template to render |
||
51 | * @param array $parameters Any parameters to render the template with |
||
52 | * @throws \Exception |
||
53 | * @return string |
||
54 | */ |
||
55 | public function render($templateName, array $parameters = array()) |
||
69 | } |
||
70 |