forked from Chaospott/site
added a few articles, added media
This commit is contained in:
26
_site/tmp/var/www/chaospott.de/engine/Template.php
Normal file
26
_site/tmp/var/www/chaospott.de/engine/Template.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
class Template
|
||||
{
|
||||
public static $template_dir = '.';
|
||||
|
||||
public $content = array();
|
||||
|
||||
private $template_filename = false;
|
||||
private $dom;
|
||||
|
||||
public function __construct($template_name)
|
||||
{
|
||||
$this->template_filename = self::$template_dir . '/' . $template_name;
|
||||
}
|
||||
|
||||
public function outputHTML()
|
||||
{
|
||||
ob_start();
|
||||
$content = $this->content;
|
||||
include($this->template_filename);
|
||||
$contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $contents;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user