1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* @author Bram Gerritsen [email protected] |
4
|
|
|
* @author Aeneas Rekkas |
5
|
|
|
* @copyright (c) Bram Gerritsen 2013 |
6
|
|
|
* @license http://opensource.org/licenses/mit-license.php |
7
|
|
|
*/ |
8
|
|
|
|
9
|
|
|
namespace StrokerCache\Options; |
10
|
|
|
|
11
|
|
|
use Zend\Stdlib\AbstractOptions; |
12
|
|
|
|
13
|
|
|
class ModuleOptions extends AbstractOptions |
14
|
|
|
{ |
15
|
|
|
/** |
16
|
|
|
* @var array |
17
|
|
|
*/ |
18
|
|
|
protected $idGenerators; |
19
|
|
|
/** |
20
|
|
|
* @var array |
21
|
|
|
*/ |
22
|
|
|
protected $strategies; |
23
|
|
|
/** |
24
|
|
|
* @var array |
25
|
|
|
*/ |
26
|
|
|
protected $storageAdapter; |
27
|
|
|
/** |
28
|
|
|
* @var bool |
29
|
|
|
*/ |
30
|
|
|
protected $cacheResponse = true; |
31
|
|
|
/** |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
protected $idGenerator = 'requesturi'; |
35
|
|
|
/** |
36
|
|
|
* @var bool |
37
|
|
|
*/ |
38
|
|
|
protected $addDebugHeaders = true; |
39
|
8 |
|
|
40
|
|
|
/** |
41
|
8 |
|
* @return boolean |
42
|
|
|
*/ |
43
|
|
|
public function getCacheResponse() |
44
|
|
|
{ |
45
|
|
|
return $this->cacheResponse; |
46
|
|
|
} |
47
|
2 |
|
|
48
|
|
|
/** |
49
|
2 |
|
* @param boolean $cacheResponse |
50
|
2 |
|
*/ |
51
|
|
|
public function setCacheResponse($cacheResponse) |
52
|
|
|
{ |
53
|
|
|
$this->cacheResponse = $cacheResponse; |
54
|
|
|
} |
55
|
1 |
|
|
56
|
|
|
/** |
57
|
1 |
|
* @return string |
58
|
|
|
*/ |
59
|
|
|
public function getIdGenerator() |
60
|
|
|
{ |
61
|
|
|
return $this->idGenerator; |
62
|
|
|
} |
63
|
1 |
|
|
64
|
|
|
/** |
65
|
1 |
|
* @param string $idGenerator |
66
|
1 |
|
*/ |
67
|
|
|
public function setIdGenerator($idGenerator) |
68
|
|
|
{ |
69
|
|
|
$this->idGenerator = $idGenerator; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return array |
74
|
|
|
*/ |
75
|
|
|
public function getIdGenerators() |
76
|
|
|
{ |
77
|
|
|
return $this->idGenerators; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @param array $idGenerators |
82
|
|
|
*/ |
83
|
|
|
public function setIdGenerators($idGenerators) |
84
|
|
|
{ |
85
|
|
|
$this->idGenerators = $idGenerators; |
86
|
|
|
} |
87
|
1 |
|
|
88
|
|
|
/** |
89
|
1 |
|
* @return array |
90
|
|
|
*/ |
91
|
|
|
public function getStorageAdapter() |
92
|
|
|
{ |
93
|
|
|
return $this->storageAdapter; |
94
|
|
|
} |
95
|
1 |
|
|
96
|
|
|
/** |
97
|
1 |
|
* @param array $storageAdapter |
98
|
1 |
|
*/ |
99
|
|
|
public function setStorageAdapter(array $storageAdapter) |
100
|
|
|
{ |
101
|
|
|
$this->storageAdapter = $storageAdapter; |
102
|
|
|
} |
103
|
1 |
|
|
104
|
|
|
/** |
105
|
1 |
|
* @return array |
106
|
|
|
*/ |
107
|
|
|
public function getStrategies() |
108
|
|
|
{ |
109
|
|
|
return $this->strategies; |
110
|
|
|
} |
111
|
1 |
|
|
112
|
|
|
/** |
113
|
1 |
|
* @param array $strategies |
114
|
1 |
|
*/ |
115
|
|
|
public function setStrategies(array $strategies) |
116
|
|
|
{ |
117
|
|
|
$this->strategies = $strategies; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* @return bool |
122
|
|
|
*/ |
123
|
|
|
public function isAddDebugHeaders() |
124
|
|
|
{ |
125
|
|
|
return $this->addDebugHeaders; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @param bool $addDebugHeaders |
130
|
|
|
*/ |
131
|
|
|
public function setAddDebugHeaders($addDebugHeaders) |
132
|
|
|
{ |
133
|
|
|
$this->addDebugHeaders = $addDebugHeaders; |
134
|
|
|
} |
135
|
|
|
} |
136
|
|
|
|