diff --git a/lib/Page.php b/lib/Page.php new file mode 100644 index 0000000..4da455e --- /dev/null +++ b/lib/Page.php @@ -0,0 +1,59 @@ + + + + $$TITLE$$ + + + +
+ $$PAGECONTENT$$ +
+ + + '; + + public function __construct() + { + + } + + public function __destruct($title) + { + $this->title = $title; + } + + public function addContent($content) + { + $this->pagecontent .= $content; + } + + public function setTemplate($template){ + $this->template = $template; + } + + public function setNavigation($navigation){ + $this->navigation = $navigation; + } + + public function displayPage(){ + $page = $this->template; + $page = str_replace('$$TITLE$$', $this->title, $page); + $page = str_replace('$$NAVIGATION$$', $this->navigation, $page); + $page = str_replace('$$PAGECONTENT$$', $this->pagecontent, $page); + + echo $page; + } +} \ No newline at end of file