| Total Complexity | 4 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class View implements ViewContract |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The Jaxon template engine |
||
| 13 | * |
||
| 14 | * @var Engine |
||
| 15 | */ |
||
| 16 | protected $xEngine; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The class constructor |
||
| 20 | */ |
||
| 21 | public function __construct(Engine $xEngine) |
||
| 22 | { |
||
| 23 | $this->xEngine = $xEngine; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Add a namespace to this view renderer |
||
| 28 | * |
||
| 29 | * @param string $sNamespace The namespace name |
||
| 30 | * @param string $sDirectory The namespace directory |
||
| 31 | * @param string $sExtension The extension to append to template names |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function addNamespace($sNamespace, $sDirectory, $sExtension = '') |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Render a view |
||
| 42 | * |
||
| 43 | * @param Store $store A store populated with the view data |
||
| 44 | * |
||
| 45 | * @return string The string representation of the view |
||
| 46 | */ |
||
| 47 | public function render(Store $store) |
||
| 60 |