1 | <?php |
||
4 | class Page |
||
5 | { |
||
6 | protected $title; |
||
7 | protected $encoding = 'utf-8'; |
||
8 | protected $language = 'en_US'; |
||
9 | protected $stylesheets = array(); |
||
10 | protected $metas = array(); |
||
11 | protected $scripts = array(); |
||
12 | protected $rss = array(); |
||
13 | protected $htmlClass = array(); |
||
14 | |||
15 | 1 | public function __construct() |
|
19 | |||
20 | |||
21 | 1 | public function setLanguage($language) |
|
27 | |||
28 | public function setEncoding($encoding) |
||
34 | |||
35 | public function setTitle($title) |
||
41 | |||
42 | // |
||
43 | // Stylesheets |
||
44 | // |
||
45 | |||
46 | /** |
||
47 | * Add a stylesheet |
||
48 | * @param string $id Unique stylesheet identifier |
||
49 | * @param string $url Stylesheet URL |
||
50 | * @param string $media Stylesheet media (default: all) |
||
51 | */ |
||
52 | public function addStylesheet($id, $url, $media = 'all') |
||
58 | |||
59 | /** |
||
60 | * Render stylesheets html tags |
||
61 | * @return string Stylesheet HTML |
||
62 | */ |
||
63 | protected function renderStylesheets() |
||
77 | |||
78 | public function addHtmlClass($className) |
||
84 | |||
85 | /** |
||
86 | * Add a RSS Feed |
||
87 | * @param string $id Unique stylesheet identifier |
||
88 | * @param string $url Feed URL |
||
89 | * @param string $title Title of the feed |
||
90 | */ |
||
91 | public function addRss($id, $url, $title) |
||
97 | |||
98 | protected function renderRss() |
||
111 | |||
112 | // |
||
113 | // Scripts |
||
114 | // |
||
115 | public function addScript($id, $url) |
||
121 | |||
122 | protected function renderScripts() |
||
132 | |||
133 | // |
||
134 | // Metas |
||
135 | // |
||
136 | public function addMeta($name, $content) |
||
142 | |||
143 | public function addMetaProperty($name, $content) |
||
147 | |||
148 | public function addMetaLink($name, $type, $href) |
||
152 | |||
153 | protected function renderMetas() |
||
168 | |||
169 | public function render($content = '') |
||
189 | } |
||
190 |