Renderer.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | namespace FSVendor\WPDesk\View\Renderer; |
| 4 | |
| 5 | use FSVendor\WPDesk\View\Resolver\Resolver; |
| 6 | /** |
| 7 | * Can render templates |
| 8 | */ |
| 9 | interface Renderer |
| 10 | { |
| 11 | /** |
| 12 | * Set the resolver used to map a template name to a resource the renderer may consume. |
| 13 | * |
| 14 | * @param Resolver $resolver |
| 15 | */ |
| 16 | public function set_resolver(Resolver $resolver); |
| 17 | /** |
| 18 | * @param string $template |
| 19 | * @param array $params |
| 20 | * |
| 21 | * @return string |
| 22 | */ |
| 23 | public function render(string $template, ?array $params = null); |
| 24 | /** |
| 25 | * @param string $template |
| 26 | * @param array $params |
| 27 | */ |
| 28 | public function output_render(string $template, ?array $params = null); |
| 29 | } |
| 30 |