1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @author Matthias Glaub <[email protected]> |
5
|
|
|
* @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace MaglLegacyApplication\Options; |
9
|
|
|
|
10
|
|
|
class LegacyControllerOptions extends \Zend\Stdlib\AbstractOptions |
11
|
|
|
{ |
12
|
|
|
|
13
|
|
|
private $docRoot = array('public'); |
14
|
|
|
|
15
|
|
|
private $indexFiles = array(); |
16
|
|
|
|
17
|
|
|
private $globals = array( |
18
|
|
|
'get' => true, |
19
|
|
|
'request' => true, |
20
|
|
|
); |
21
|
|
|
|
22
|
|
|
private $prependOutputBufferToResponse = false; |
23
|
|
|
|
24
|
1 |
|
public function getDocRoot() |
25
|
|
|
{ |
26
|
1 |
|
return reset($this->docRoot); |
27
|
|
|
} |
28
|
|
|
|
29
|
5 |
|
public function getDocRoots() |
30
|
|
|
{ |
31
|
5 |
|
return $this->docRoot; |
32
|
|
|
} |
33
|
|
|
|
34
|
4 |
|
public function getGlobals() |
35
|
|
|
{ |
36
|
4 |
|
return $this->globals; |
37
|
|
|
} |
38
|
|
|
|
39
|
6 |
|
public function setDocRoot($docRoot) |
40
|
|
|
{ |
41
|
6 |
|
if(!is_array($docRoot)) { |
|
|
|
|
42
|
1 |
|
$docRoot = array($docRoot); |
43
|
1 |
|
} |
44
|
6 |
|
$this->docRoot = $docRoot; |
45
|
6 |
|
} |
46
|
|
|
|
47
|
5 |
|
public function setGlobals($globals) |
48
|
|
|
{ |
49
|
5 |
|
$this->globals = $globals; |
50
|
5 |
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return array |
54
|
|
|
*/ |
55
|
|
|
public function getIndexFiles() |
56
|
|
|
{ |
57
|
|
|
return $this->indexFiles; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @param array $indexFiles |
62
|
|
|
*/ |
63
|
|
|
public function setIndexFiles($indexFiles) |
64
|
|
|
{ |
65
|
|
|
$this->indexFiles = $indexFiles; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return boolean |
70
|
|
|
*/ |
71
|
|
|
public function getPrependOutputBufferToResponse() |
72
|
|
|
{ |
73
|
|
|
return $this->prependOutputBufferToResponse; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @param boolean $prependOutputBufferToResponse |
78
|
|
|
*/ |
79
|
|
|
public function setPrependOutputBufferToResponse($prependOutputBufferToResponse) |
80
|
|
|
{ |
81
|
|
|
$this->prependOutputBufferToResponse = $prependOutputBufferToResponse; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
|
85
|
|
|
} |
86
|
|
|
|