-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsite.php
More file actions
43 lines (33 loc) · 891 Bytes
/
csite.php
File metadata and controls
43 lines (33 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
class csite {
private $headers;
private $footers;
public $page;
public function __construct() {
$this->headers = array();
$this->footers = array();
}
public function __destruct() {
// clean up here
}
public function render() {
foreach($this->headers as $header) {
echo "render header";
include $header;
}
$this->page->render();
foreach($this->footers as $footer) {
include $footer;
}
}
public function addHeader($file) {
$this->headers[]= $file;
}
public function addFooter($file) {
$this->footers[] = $file;
}
public function setPage(cpage $page) {
$this->page = $page;
}
}
?>