1: <?php
2:
3: namespace Charcoal\View;
4:
5: /**
6: * View Interface
7: */
8: interface ViewInterface
9: {
10: /**
11: * Load a template (from identifier).
12: *
13: * @param string $templateIdent The template identifier to load..
14: * @throws InvalidArgumentException If the template ident is not a string.
15: * @return string
16: */
17: public function loadTemplate($templateIdent);
18:
19: /**
20: * Load a template (from identifier) and render it.
21: *
22: * @param string $templateIdent The template identifier, to load and render.
23: * @param mixed $context The view controller (rendering context).
24: * @return string
25: */
26: public function render($templateIdent, $context = null);
27:
28: /**
29: * Render a template (from string).
30: *
31: * @param string $templateString The full template string to render.
32: * @param mixed $context The view controller (rendering context).
33: * @return string
34: */
35: public function renderTemplate($templateString, $context = null);
36: }
37: