Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | // Page class
|
---|
4 | // Date: 2012-06-13
|
---|
5 |
|
---|
6 | class Page
|
---|
7 | {
|
---|
8 | protected $Content = '';
|
---|
9 | protected $Language;
|
---|
10 | protected $Key;
|
---|
11 | public $Link;
|
---|
12 |
|
---|
13 | function __construct($Key,$Language)
|
---|
14 | {
|
---|
15 | $this->Language = $Language;
|
---|
16 | $Name = $Language->Texts[$Key]['name'];
|
---|
17 | $Title = $Language->Texts[$Key]['title'];
|
---|
18 | $Addres = '?'.$Key;
|
---|
19 | $this->Key = $Key;
|
---|
20 | $this->Content = $Language->Texts[$Key]['content'];
|
---|
21 | $this->Link = new Link($Name,$Addres,$Title);
|
---|
22 | }
|
---|
23 |
|
---|
24 | //Generate and show this page
|
---|
25 | public function Show() {
|
---|
26 | $this->Generate();
|
---|
27 | echo ($this->Content);
|
---|
28 | }
|
---|
29 |
|
---|
30 | protected function Generate($Content) {
|
---|
31 | $this->Content = $Content;
|
---|
32 | }
|
---|
33 |
|
---|
34 | //Get key of page
|
---|
35 | public function GetKey() {
|
---|
36 | return $this->Key;
|
---|
37 | }
|
---|
38 |
|
---|
39 | //sets title of page
|
---|
40 | protected function SetTitle($Title) {
|
---|
41 | $this->Link->Title = $Title;
|
---|
42 | }
|
---|
43 |
|
---|
44 | }
|
---|
45 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.