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