File "template.php"
Full path: /home/cakedeco/retaildirectonline.co.uk/system/storage/modification/system/library/template/template.php
File
size: 453 B (453 B bytes)
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
<?php
namespace Template;
final class Template {
private $data = array();
public function set($key, $value) {
$this->data[$key] = $value;
}
public function render($template) {
$file = DIR_TEMPLATE . $template . '.tpl';
if (is_file($file)) {
extract($this->data);
ob_start();
require(modification($file));
return ob_get_clean();
}
throw new \Exception('Error: Could not load template ' . $file . '!');
exit();
}
}