1 | <?php |
||
49 | class Vhost |
||
50 | { |
||
51 | /** |
||
52 | * Virtual host ID |
||
53 | * |
||
54 | * @var integer |
||
55 | * @Id @Column(type="integer") |
||
56 | * @GeneratedValue |
||
57 | */ |
||
58 | protected $id; |
||
59 | /** |
||
60 | * Active |
||
61 | * |
||
62 | * @var boolean |
||
63 | * @Column(type="boolean") |
||
64 | */ |
||
65 | protected $active; |
||
66 | /** |
||
67 | * Account this domain is belonging to |
||
68 | * |
||
69 | * @var Account |
||
70 | * @ManyToOne(targetEntity="Tollwerk\Admin\Infrastructure\Model\Account", inversedBy="vhosts") |
||
71 | */ |
||
72 | protected $account; |
||
73 | /** |
||
74 | * Virtual host type |
||
75 | * |
||
76 | * @var string |
||
77 | * @Column(type="enumvhosttype") |
||
78 | */ |
||
79 | protected $type; |
||
80 | /** |
||
81 | * List of all associated domains |
||
82 | * |
||
83 | * @var Domain[] |
||
84 | * @OneToMany(targetEntity="Tollwerk\Admin\Infrastructure\Model\Domain", mappedBy="account") |
||
85 | */ |
||
86 | protected $domains; |
||
87 | /** |
||
88 | * Primary domain of this virtual host |
||
89 | * |
||
90 | * @var Domain |
||
91 | */ |
||
92 | protected $primarydomain; |
||
93 | /** |
||
94 | * Document root directory |
||
95 | * |
||
96 | * @var string |
||
97 | * @Column(length=128,unique=true) |
||
98 | */ |
||
99 | protected $docroot; |
||
100 | /** |
||
101 | * HTTP Port |
||
102 | * |
||
103 | * @var int|null |
||
104 | * @Column(type="integer", nullable=true, options={"unsigned":true, "default":80}) |
||
105 | */ |
||
106 | protected $httpport; |
||
107 | /** |
||
108 | * HTTPS Port |
||
109 | * |
||
110 | * @var int|null |
||
111 | * @Column(type="integer", nullable=true, options={"unsigned":true, "default":443}) |
||
112 | */ |
||
113 | protected $httpsport; |
||
114 | /** |
||
115 | * Supported PHP version |
||
116 | * |
||
117 | * @var float|null |
||
118 | * @Column(type="decimal",precision=2,scale=1,nullable=true) |
||
119 | */ |
||
120 | protected $php; |
||
121 | /** |
||
122 | * Redirect URL |
||
123 | * |
||
124 | * @var string |
||
125 | * @Column(length=128) |
||
126 | */ |
||
127 | protected $redirecturl; |
||
128 | /** |
||
129 | * Redirect status |
||
130 | * |
||
131 | * @var int |
||
132 | * @Column(type="integer", nullable=false, options={"unsigned":true, "default":301}) |
||
133 | */ |
||
134 | protected $redirectstatus; |
||
135 | |||
136 | /** |
||
137 | * Return the vhost ID |
||
138 | * |
||
139 | * @return int Vhost ID |
||
140 | */ |
||
141 | public function getId() |
||
145 | |||
146 | /** |
||
147 | * Set the vhost ID |
||
148 | * |
||
149 | * @param int $id Vhost ID |
||
150 | * @return Vhost |
||
151 | */ |
||
152 | public function setId($id) |
||
157 | |||
158 | /** |
||
159 | * Set whether this is an active vhost |
||
160 | * |
||
161 | * @param boolean $active Active vhost |
||
162 | * @return Vhost |
||
163 | */ |
||
164 | public function setActive($active) |
||
169 | |||
170 | /** |
||
171 | * Return whether the vhost is ative |
||
172 | * |
||
173 | * @return boolean Active vhost |
||
174 | */ |
||
175 | public function isActive() |
||
179 | |||
180 | /** |
||
181 | * Return the account this virtual host is belonging to |
||
182 | * |
||
183 | * @return Account Account |
||
184 | */ |
||
185 | public function getAccount() |
||
189 | |||
190 | /** |
||
191 | * Set the account this virtual host is belonging tp |
||
192 | * |
||
193 | * @param Account $account Account |
||
194 | * @return Vhost Self reference |
||
195 | */ |
||
196 | public function setAccount($account) |
||
201 | |||
202 | /** |
||
203 | * Return the virtual host type |
||
204 | * |
||
205 | * @return string Virtual host type |
||
206 | */ |
||
207 | public function getType() |
||
211 | |||
212 | /** |
||
213 | * Set the virtual host type |
||
214 | * |
||
215 | * @param string $type Virtual host type |
||
216 | * @return Vhost Self reference |
||
217 | */ |
||
218 | public function setType($type) |
||
223 | |||
224 | /** |
||
225 | * Return the associated domains |
||
226 | * |
||
227 | * @return Domain[] Associated domains |
||
228 | */ |
||
229 | public function getDomains() |
||
233 | |||
234 | /** |
||
235 | * Set the associated domains |
||
236 | * |
||
237 | * @param Domain[] $domains Associated domains |
||
238 | * @return Vhost Self reference |
||
239 | */ |
||
240 | public function setDomains($domains) |
||
245 | |||
246 | /** |
||
247 | * Return the primary domain of this virtual host |
||
248 | * |
||
249 | * @return Domain Primary domain |
||
250 | */ |
||
251 | public function getPrimarydomain() |
||
261 | |||
262 | /** |
||
263 | * Set the primary domain of this virtual host |
||
264 | * |
||
265 | * @param Domain $primarydomain Primary domain |
||
266 | * @return Vhost Self reference |
||
267 | */ |
||
268 | public function setPrimarydomain($primarydomain) |
||
273 | |||
274 | /** |
||
275 | * Return the document root |
||
276 | * |
||
277 | * @return string Document root |
||
278 | */ |
||
279 | public function getDocroot() |
||
283 | |||
284 | /** |
||
285 | * Set the document root |
||
286 | * |
||
287 | * @param string $docroot Document root |
||
288 | * @return Vhost Self reference |
||
289 | */ |
||
290 | public function setDocroot($docroot) |
||
295 | |||
296 | /** |
||
297 | * Return the HTTP port |
||
298 | * |
||
299 | * @return int|null HTTP port |
||
300 | */ |
||
301 | public function getHttpport() |
||
305 | |||
306 | /** |
||
307 | * Set the HTTP port |
||
308 | * |
||
309 | * @param int|null $httpport HTTP port |
||
310 | * @return Vhost Self reference |
||
311 | */ |
||
312 | public function setHttpport($httpport) |
||
317 | |||
318 | /** |
||
319 | * Return the HTTPS port |
||
320 | * |
||
321 | * @return int|null HTTPS port |
||
322 | */ |
||
323 | public function getHttpsport() |
||
327 | |||
328 | /** |
||
329 | * Set the HTTPS port |
||
330 | * |
||
331 | * @param int|null $httpsport HTTPS port |
||
332 | * @return Vhost |
||
333 | */ |
||
334 | public function setHttpsport($httpsport) |
||
339 | |||
340 | /** |
||
341 | * Return the supported PHP version |
||
342 | * |
||
343 | * @return float|null Supported PHP version |
||
344 | */ |
||
345 | public function getPhp() |
||
349 | |||
350 | /** |
||
351 | * Set the supported PHP version |
||
352 | * |
||
353 | * @param float|null $php Supported PHP version |
||
354 | * @return Vhost Self reference |
||
355 | */ |
||
356 | public function setPhp($php) |
||
361 | |||
362 | /** |
||
363 | * Return the redirect URL |
||
364 | * |
||
365 | * @return string Redirect URL |
||
366 | */ |
||
367 | public function getRedirecturl() |
||
371 | |||
372 | /** |
||
373 | * Set the redirect URL |
||
374 | * |
||
375 | * @param string $redirecturl Redirect URL |
||
376 | * @return Vhost Self reference |
||
377 | */ |
||
378 | public function setRedirecturl($redirecturl) |
||
383 | |||
384 | /** |
||
385 | * Return the redirect status |
||
386 | * |
||
387 | * @return int Redirect status |
||
388 | */ |
||
389 | public function getRedirectstatus() |
||
393 | |||
394 | /** |
||
395 | * Set the redirect status |
||
396 | * |
||
397 | * @param int $redirectstatus Redirect status |
||
398 | * @return Vhost Self reference |
||
399 | */ |
||
400 | public function setRedirectstatus($redirectstatus) |
||
405 | } |
||
406 |