first commit

This commit is contained in:
Konstantin
2026-05-30 09:27:58 +03:00
commit de0344d218
2371 changed files with 661486 additions and 0 deletions
@@ -0,0 +1,26 @@
<?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();
}
}