1 | <?php |
||
20 | class DebuggerOptions extends AbstractOptions |
||
21 | { |
||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | protected $enabled = true; |
||
26 | |||
27 | /** |
||
28 | * @var bool|null |
||
29 | */ |
||
30 | protected $mode = null; |
||
31 | |||
32 | /** |
||
33 | * @var bool |
||
34 | */ |
||
35 | protected $bar = false; |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $barPanels = [ |
||
41 | 'WebinoDebug:info' => InfoPanel::class, |
||
42 | 'WebinoDebug:config' => ConfigPanel::class, |
||
43 | 'WebinoDebug:events' => EventPanel::class, |
||
44 | ]; |
||
45 | |||
46 | /** |
||
47 | * @var bool |
||
48 | */ |
||
49 | protected $strict = true; |
||
50 | |||
51 | /** |
||
52 | * @var string|null |
||
53 | */ |
||
54 | protected $log; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | protected $email = ''; |
||
60 | |||
61 | /** |
||
62 | * @var int |
||
63 | */ |
||
64 | protected $maxDepth = 10; |
||
65 | |||
66 | /** |
||
67 | * @var int |
||
68 | */ |
||
69 | protected $maxLength = 300; |
||
70 | |||
71 | /** |
||
72 | * Is debugger enabled? |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | public function isEnabled() |
||
80 | |||
81 | /** |
||
82 | * Enable debugger |
||
83 | * |
||
84 | * @param bool $enabled |
||
85 | * @return $this |
||
86 | */ |
||
87 | public function setEnabled($enabled) |
||
92 | |||
93 | /** |
||
94 | * Is debugger disabled? |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | public function isDisabled() |
||
102 | |||
103 | /** |
||
104 | * Debugger mode |
||
105 | * |
||
106 | * true = production|false |
||
107 | * false = development|null |
||
108 | * null = autodetect|IP address(es) csv/array |
||
109 | * |
||
110 | * @return bool|null |
||
111 | */ |
||
112 | public function getMode() |
||
116 | |||
117 | /** |
||
118 | * Debugger mode, production or development. |
||
119 | * |
||
120 | * @param bool|null $mode |
||
121 | * @return $this |
||
122 | */ |
||
123 | public function setMode($mode) |
||
128 | |||
129 | /** |
||
130 | * Is debugger bar enabled? |
||
131 | * |
||
132 | * @return bool |
||
133 | */ |
||
134 | public function showBar() |
||
138 | |||
139 | /** |
||
140 | * @param bool $bar |
||
141 | * @return $this |
||
142 | */ |
||
143 | public function setBar($bar) |
||
148 | |||
149 | /** |
||
150 | * Debugger bar panels |
||
151 | * |
||
152 | * @return array |
||
153 | */ |
||
154 | public function getBarPanels() |
||
158 | |||
159 | /** |
||
160 | * @param array $barPanels |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function setBarPanels(array $barPanels) |
||
168 | |||
169 | /** |
||
170 | * @return bool |
||
171 | */ |
||
172 | public function isStrict() |
||
176 | |||
177 | /** |
||
178 | * Strict errors? |
||
179 | * |
||
180 | * @param bool $strict |
||
181 | * @return $this |
||
182 | */ |
||
183 | public function setStrict($strict) |
||
188 | |||
189 | /** |
||
190 | * @return string Empty string to disable, null for default |
||
191 | */ |
||
192 | public function getLog() |
||
199 | |||
200 | /** |
||
201 | * Path to log directory |
||
202 | * |
||
203 | * @param string $log |
||
204 | * @return $this |
||
205 | */ |
||
206 | public function setLog($log) |
||
211 | |||
212 | /** |
||
213 | * Administrator address |
||
214 | * |
||
215 | * @return string |
||
216 | */ |
||
217 | public function getEmail() |
||
221 | |||
222 | /** |
||
223 | * Configure debugger administrator email |
||
224 | * |
||
225 | * @param string $email |
||
226 | * @return $this |
||
227 | */ |
||
228 | public function setEmail($email) |
||
233 | |||
234 | /** |
||
235 | * @return int |
||
236 | */ |
||
237 | public function getMaxDepth() |
||
241 | |||
242 | /** |
||
243 | * Variable dump max depth |
||
244 | * |
||
245 | * @param int $maxDepth |
||
246 | * @return $this |
||
247 | */ |
||
248 | public function setMaxDepth($maxDepth) |
||
253 | |||
254 | /** |
||
255 | * @return int |
||
256 | */ |
||
257 | public function getMaxLength() |
||
261 | |||
262 | /** |
||
263 | * Maximum length of a variable |
||
264 | * |
||
265 | * @param int $maxLength |
||
266 | * @return $this |
||
267 | */ |
||
268 | public function setMaxLength($maxLength) |
||
273 | } |
||
274 |