Initial commit.
This is to be the new HashRU website based on the Aaronweb.net/Kabuki CMS.
This commit is contained in:
34
templates/Template.php
Normal file
34
templates/Template.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* Template.php
|
||||
* Contains key Template interface.
|
||||
*
|
||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||
*****************************************************************************/
|
||||
|
||||
abstract class Template
|
||||
{
|
||||
protected $_subtemplates = array();
|
||||
|
||||
abstract public function html_main();
|
||||
|
||||
public function adopt(Template $template, $position = 'end')
|
||||
{
|
||||
// By default, we append it.
|
||||
if ($position == 'end')
|
||||
$this->_subtemplates[] = $template;
|
||||
// We can also add it to the beginning of the list, though.
|
||||
else
|
||||
array_unshift($this->_subtemplates, $template);
|
||||
}
|
||||
|
||||
public function clear()
|
||||
{
|
||||
$this->_subtemplates = [];
|
||||
}
|
||||
|
||||
public function pass($id, $data)
|
||||
{
|
||||
$this->{$id} = $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user