| 1 | <?php |
||
| 7 | class Page |
||
| 8 | { |
||
| 9 | private $id; |
||
| 10 | private $template; |
||
| 11 | private $variables; |
||
| 12 | private $meta; |
||
| 13 | |||
| 14 | 4 | public function __construct( |
|
| 24 | |||
| 25 | 4 | public static function make( |
|
| 32 | |||
| 33 | public function id(): string |
||
| 34 | { |
||
| 35 | return $this->id; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function template(): string |
||
| 39 | { |
||
| 40 | return $this->template; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function variables(): array |
||
| 44 | { |
||
| 45 | return $this->variables; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function variable(string $name) |
||
| 49 | { |
||
| 50 | return $this->variables[$name] ?? null; |
||
| 51 | } |
||
| 52 | |||
| 53 | 2 | public function meta(): Meta |
|
| 57 | |||
| 58 | 4 | private function setMeta(): void |
|
| 80 | } |
||
| 81 |