| 1234567891011121314151617181920212223 |
- <?php
- use Template\RenderableTemplate as RenderableTemplate;
- class DefaultTemplate extends RenderableTemplate {
- public function __construct() {
-
- }
- public function render() {
- $this->content = file_get_contents(__DIR__ . '/template.html');
- if(is_file($this->getView()['location'])){
- $this->content = str_replace('{{>content}}', $this->replaceSections(file_get_contents($this->getView()['location']), $this->_view['values']), $this->content);
- }else{
- $this->content = str_replace('{{>content}}', '', $this->content);
- }
- $this->implate();
- }
- }
|