1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
HCSF - A multilingual CMS and Shopsystem |
5
|
|
|
Copyright (C) 2014 Marcus Haase - [email protected] |
6
|
|
|
|
7
|
|
|
This program is free software: you can redistribute it and/or modify |
8
|
|
|
it under the terms of the GNU General Public License as published by |
9
|
|
|
the Free Software Foundation, either version 3 of the License, or |
10
|
|
|
(at your option) any later version. |
11
|
|
|
|
12
|
|
|
This program is distributed in the hope that it will be useful, |
13
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
GNU General Public License for more details. |
16
|
|
|
|
17
|
|
|
You should have received a copy of the GNU General Public License |
18
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace HaaseIT\HCSF; |
22
|
|
|
|
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Class Page |
26
|
|
|
* @package HaaseIT\HCSF |
27
|
|
|
*/ |
28
|
|
|
/** |
29
|
|
|
* Class Page |
30
|
|
|
* @package HaaseIT\HCSF |
31
|
|
|
*/ |
32
|
|
|
class Page |
33
|
|
|
{ |
34
|
|
|
/** |
35
|
|
|
* @var \Zend\ServiceManager\ServiceManager |
36
|
|
|
*/ |
37
|
|
|
protected $serviceManager; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var string |
41
|
|
|
*/ |
42
|
|
|
protected $customroottemplate; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
*/ |
47
|
|
|
public $cb_pagetype; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @var string |
51
|
|
|
*/ |
52
|
|
|
public $cb_subnav; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var string |
56
|
|
|
*/ |
57
|
|
|
public $cb_customcontenttemplate; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @var int |
61
|
|
|
*/ |
62
|
|
|
protected $status = 200; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var \HaaseIT\HCSF\PagePayload |
66
|
|
|
*/ |
67
|
|
|
public $oPayload; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @var array |
71
|
|
|
*/ |
72
|
|
|
public $cb_customdata; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @var array|string |
76
|
|
|
*/ |
77
|
|
|
public $cb_pageconfig; |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @var array |
81
|
|
|
*/ |
82
|
|
|
protected $headers = []; |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @var string |
86
|
|
|
*/ |
87
|
|
|
protected $contenttype = 'text/html; charset=utf-8'; |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @var bool |
91
|
|
|
*/ |
92
|
|
|
protected $renderwithtemplate = true; |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return string |
96
|
|
|
*/ |
97
|
|
|
public function getContenttype() |
98
|
|
|
{ |
99
|
|
|
return $this->contenttype; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @param string $contenttype |
104
|
|
|
*/ |
105
|
|
|
public function setContenttype($contenttype) |
106
|
|
|
{ |
107
|
|
|
$this->contenttype = $contenttype; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* @return bool |
112
|
|
|
*/ |
113
|
|
|
public function isRenderwithtemplate() |
114
|
|
|
{ |
115
|
|
|
return $this->renderwithtemplate; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param bool $renderwithtemplate |
120
|
|
|
*/ |
121
|
|
|
public function setRenderwithtemplate($renderwithtemplate) |
122
|
|
|
{ |
123
|
|
|
$this->renderwithtemplate = $renderwithtemplate; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return string |
128
|
|
|
*/ |
129
|
|
|
public function getCustomRootTemplate() |
130
|
|
|
{ |
131
|
|
|
return $this->customroottemplate; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @return array |
136
|
|
|
*/ |
137
|
|
|
public function getHeaders() |
138
|
|
|
{ |
139
|
|
|
return $this->headers; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @param string $header |
144
|
|
|
*/ |
145
|
|
|
public function setHeader($key, $header) |
146
|
|
|
{ |
147
|
|
|
$this->headers[$key] = $header; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @return int |
152
|
|
|
*/ |
153
|
|
|
public function getStatus() |
154
|
|
|
{ |
155
|
|
|
return $this->status; |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* @param int $status |
160
|
|
|
*/ |
161
|
|
|
public function setStatus($status) |
162
|
|
|
{ |
163
|
|
|
$this->status = $status; |
164
|
|
|
} |
165
|
|
|
} |
166
|
|
|
|