Total Complexity | 114 |
Total Lines | 1125 |
Duplicated Lines | 0 % |
Changes | 5 | ||
Bugs | 0 | Features | 1 |
Complex classes like SiteConfiguration often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use SiteConfiguration, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
19 | class SiteConfiguration |
||
20 | { |
||
21 | private $baseUrl = 'https://accounts.wmflabs.org'; |
||
22 | private $filePath = __DIR__ . '/..'; |
||
23 | private $schemaVersion = 51; |
||
24 | private $debuggingTraceEnabled = false; |
||
25 | private $debuggingCssBreakpointsEnabled = false; |
||
26 | private $dataClearIp = '127.0.0.1'; |
||
27 | private $dataClearEmail = '[email protected]'; |
||
28 | private $dataClearInterval = '15 DAY'; |
||
29 | private $forceIdentification = true; |
||
30 | private $identificationCacheExpiry = '1 DAY'; |
||
31 | private $metaWikimediaWebServiceEndpoint = 'https://meta.wikimedia.org/w/api.php'; |
||
32 | private $enforceOAuth = false; |
||
33 | private $emailConfirmationEnabled = true; |
||
34 | private $emailConfirmationExpiryDays = 7; |
||
35 | private $miserModeLimit = 25; |
||
36 | private $squidList = array(); |
||
37 | private $useStrictTransportSecurity = false; |
||
38 | private $userAgent = 'Wikipedia-ACC Tool/0.1 (+https://accounts.wmflabs.org/internal.php/team)'; |
||
39 | private $curlDisableVerifyPeer = false; |
||
40 | private $useOAuthSignup = true; |
||
41 | private $oauthConsumerToken; |
||
42 | /** @var array */ |
||
43 | private $oauthLegacyConsumerTokens; |
||
44 | private $oauthConsumerSecret; |
||
45 | private $oauthIdentityGraceTime = '24 hours'; |
||
46 | private $oauthMediaWikiCanonicalServer = 'https://en.wikipedia.org'; |
||
47 | private $xffTrustedHostsFile = '../TrustedXFF/trusted-hosts.txt'; |
||
48 | private $crossOriginResourceSharingHosts = array( |
||
49 | "https://en.wikipedia.org", |
||
50 | "https://meta.wikimedia.org", |
||
51 | ); |
||
52 | private $ircNotificationsEnabled = true; |
||
53 | private $ircNotificationsInstance = 'Development'; |
||
54 | private $errorLog = 'errorlog'; |
||
55 | private $titleBlacklistEnabled = false; |
||
56 | /** @var null|string $locationProviderApiKey */ |
||
57 | private $locationProviderApiKey = null; |
||
58 | private $torExitPaths = array(); |
||
59 | private $creationBotUsername = ''; |
||
60 | private $creationBotPassword = ''; |
||
61 | private $curlCookieJar = __DIR__ . '/../../cookies.txt'; |
||
62 | private $yubicoApiId = 0; |
||
63 | private $yubicoApiKey = ""; |
||
64 | private $totpEncryptionKey = "1234"; |
||
65 | private $identificationNoticeboardPage = 'Access to nonpublic personal data policy/Noticeboard'; |
||
66 | private $identificationNoticeboardWebserviceEndpoint = 'https://meta.wikimedia.org/w/api.php'; |
||
67 | private $registrationAllowed = true; |
||
68 | private $cspReportUri = null; |
||
69 | private $resourceCacheEpoch = 1; |
||
70 | private $commonEmailDomains = ['gmail.com', 'hotmail.com', 'outlook.com']; |
||
71 | private $banMaxIpBlockRange = [4 => 20, 6 => 48]; |
||
72 | private $banMaxIpRange = [4 => 16, 6 => 32]; |
||
73 | private $jobQueueBatchSize = 10; |
||
74 | private $amqpConfiguration = ['host' => 'localhost', 'port' => 5672, 'user' => 'guest', 'password' => 'guest', 'vhost' => '/', 'exchange' => '', 'tls' => false]; |
||
75 | private $emailSender = '[email protected]'; |
||
76 | private $acceptClientHints = []; |
||
77 | private string $cookiePath = '/'; |
||
78 | private string $cookieSessionName = 'ACC'; |
||
79 | private array $offline = ['offline' => false, 'reason' => '', 'culprit' => '']; |
||
80 | private array $databaseConfig = [ |
||
81 | 'datasource' => 'mysql:host=localhost;dbname=waca', |
||
82 | 'username' => 'waca', |
||
83 | 'password' => 'waca' |
||
84 | ]; |
||
85 | private string $privacyStatementPath = ''; |
||
86 | |||
87 | private string $createAccountLink = '{articlePath}/Special:CreateAccount'; |
||
88 | |||
89 | /** |
||
90 | * Gets the base URL of the tool |
||
91 | * |
||
92 | * If the internal page of the tool is at http://localhost/path/internal.php, this would be set to |
||
93 | * http://localhost/path |
||
94 | * @return string |
||
95 | */ |
||
96 | public function getBaseUrl() |
||
97 | { |
||
98 | return $this->baseUrl; |
||
99 | } |
||
100 | |||
101 | /** |
||
102 | * @param string $baseUrl |
||
103 | * |
||
104 | * @return SiteConfiguration |
||
105 | */ |
||
106 | public function setBaseUrl($baseUrl) |
||
107 | { |
||
108 | $this->baseUrl = $baseUrl; |
||
109 | |||
110 | return $this; |
||
111 | } |
||
112 | |||
113 | /** |
||
114 | * Path on disk to the directory containing the tool's code |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getFilePath() |
||
118 | { |
||
119 | return $this->filePath; |
||
120 | } |
||
121 | |||
122 | /** |
||
123 | * @param string $filePath |
||
124 | * |
||
125 | * @return SiteConfiguration |
||
126 | */ |
||
127 | public function setFilePath($filePath) |
||
128 | { |
||
129 | $this->filePath = $filePath; |
||
130 | |||
131 | return $this; |
||
132 | } |
||
133 | |||
134 | /** |
||
135 | * @return int |
||
136 | */ |
||
137 | public function getSchemaVersion() |
||
138 | { |
||
139 | return $this->schemaVersion; |
||
140 | } |
||
141 | |||
142 | /** |
||
143 | * @param int $schemaVersion |
||
144 | * |
||
145 | * @return SiteConfiguration |
||
146 | */ |
||
147 | public function setSchemaVersion($schemaVersion) |
||
148 | { |
||
149 | $this->schemaVersion = $schemaVersion; |
||
150 | |||
151 | return $this; |
||
152 | } |
||
153 | |||
154 | /** |
||
155 | * @return mixed |
||
156 | */ |
||
157 | public function getDebuggingTraceEnabled() |
||
158 | { |
||
159 | return $this->debuggingTraceEnabled; |
||
160 | } |
||
161 | |||
162 | /** |
||
163 | * @param mixed $debuggingTraceEnabled |
||
164 | * |
||
165 | * @return SiteConfiguration |
||
166 | */ |
||
167 | public function setDebuggingTraceEnabled($debuggingTraceEnabled) |
||
168 | { |
||
169 | $this->debuggingTraceEnabled = $debuggingTraceEnabled; |
||
170 | |||
171 | return $this; |
||
172 | } |
||
173 | |||
174 | public function getDebuggingCssBreakpointsEnabled() : bool |
||
175 | { |
||
176 | return $this->debuggingCssBreakpointsEnabled; |
||
177 | } |
||
178 | |||
179 | public function setDebuggingCssBreakpointsEnabled(bool $debuggingCssBreakpointsEnabled) : SiteConfiguration |
||
180 | { |
||
181 | $this->debuggingCssBreakpointsEnabled = $debuggingCssBreakpointsEnabled; |
||
182 | |||
183 | return $this; |
||
184 | } |
||
185 | |||
186 | /** |
||
187 | * @return string |
||
188 | */ |
||
189 | public function getDataClearIp() |
||
190 | { |
||
191 | return $this->dataClearIp; |
||
192 | } |
||
193 | |||
194 | /** |
||
195 | * @param string $dataClearIp |
||
196 | * |
||
197 | * @return SiteConfiguration |
||
198 | */ |
||
199 | public function setDataClearIp($dataClearIp) |
||
200 | { |
||
201 | $this->dataClearIp = $dataClearIp; |
||
202 | |||
203 | return $this; |
||
204 | } |
||
205 | |||
206 | /** |
||
207 | * @return string |
||
208 | */ |
||
209 | public function getDataClearEmail() |
||
210 | { |
||
211 | return $this->dataClearEmail; |
||
212 | } |
||
213 | |||
214 | /** |
||
215 | * @param string $dataClearEmail |
||
216 | * |
||
217 | * @return SiteConfiguration |
||
218 | */ |
||
219 | public function setDataClearEmail($dataClearEmail) |
||
224 | } |
||
225 | |||
226 | /** |
||
227 | * @return boolean |
||
228 | */ |
||
229 | public function getForceIdentification() |
||
230 | { |
||
231 | return $this->forceIdentification; |
||
232 | } |
||
233 | |||
234 | /** |
||
235 | * @param boolean $forceIdentification |
||
236 | * |
||
237 | * @return SiteConfiguration |
||
238 | */ |
||
239 | public function setForceIdentification($forceIdentification) |
||
240 | { |
||
241 | $this->forceIdentification = $forceIdentification; |
||
242 | |||
243 | return $this; |
||
244 | } |
||
245 | |||
246 | /** |
||
247 | * @return string |
||
248 | */ |
||
249 | public function getIdentificationCacheExpiry() |
||
252 | } |
||
253 | |||
254 | /** |
||
255 | * @param string $identificationCacheExpiry |
||
256 | * |
||
257 | * @return SiteConfiguration |
||
258 | */ |
||
259 | public function setIdentificationCacheExpiry($identificationCacheExpiry) |
||
264 | } |
||
265 | |||
266 | /** |
||
267 | * @return string |
||
268 | */ |
||
269 | public function getMetaWikimediaWebServiceEndpoint() |
||
272 | } |
||
273 | |||
274 | /** |
||
275 | * @param string $metaWikimediaWebServiceEndpoint |
||
276 | * |
||
277 | * @return SiteConfiguration |
||
278 | */ |
||
279 | public function setMetaWikimediaWebServiceEndpoint($metaWikimediaWebServiceEndpoint) |
||
280 | { |
||
281 | $this->metaWikimediaWebServiceEndpoint = $metaWikimediaWebServiceEndpoint; |
||
282 | |||
283 | return $this; |
||
284 | } |
||
285 | |||
286 | /** |
||
287 | * @return boolean |
||
288 | */ |
||
289 | public function getEnforceOAuth() |
||
290 | { |
||
291 | return $this->enforceOAuth; |
||
292 | } |
||
293 | |||
294 | /** |
||
295 | * @param boolean $enforceOAuth |
||
296 | * |
||
297 | * @return SiteConfiguration |
||
298 | */ |
||
299 | public function setEnforceOAuth($enforceOAuth) |
||
300 | { |
||
301 | $this->enforceOAuth = $enforceOAuth; |
||
302 | |||
303 | return $this; |
||
304 | } |
||
305 | |||
306 | /** |
||
307 | * @return boolean |
||
308 | */ |
||
309 | public function getEmailConfirmationEnabled() |
||
310 | { |
||
311 | return $this->emailConfirmationEnabled; |
||
312 | } |
||
313 | |||
314 | /** |
||
315 | * @param boolean $emailConfirmationEnabled |
||
316 | * |
||
317 | * @return $this |
||
318 | */ |
||
319 | public function setEmailConfirmationEnabled($emailConfirmationEnabled) |
||
320 | { |
||
321 | $this->emailConfirmationEnabled = $emailConfirmationEnabled; |
||
322 | |||
323 | return $this; |
||
324 | } |
||
325 | |||
326 | /** |
||
327 | * @return int |
||
328 | */ |
||
329 | public function getMiserModeLimit() |
||
332 | } |
||
333 | |||
334 | /** |
||
335 | * @param int $miserModeLimit |
||
336 | * |
||
337 | * @return SiteConfiguration |
||
338 | */ |
||
339 | public function setMiserModeLimit($miserModeLimit) |
||
340 | { |
||
341 | $this->miserModeLimit = $miserModeLimit; |
||
342 | |||
343 | return $this; |
||
344 | } |
||
345 | |||
346 | /** |
||
347 | * @return array |
||
348 | */ |
||
349 | public function getSquidList() |
||
350 | { |
||
351 | return $this->squidList; |
||
352 | } |
||
353 | |||
354 | /** |
||
355 | * @param array $squidList |
||
356 | * |
||
357 | * @return SiteConfiguration |
||
358 | */ |
||
359 | public function setSquidList($squidList) |
||
360 | { |
||
361 | $this->squidList = $squidList; |
||
362 | |||
363 | return $this; |
||
364 | } |
||
365 | |||
366 | /** |
||
367 | * @return boolean |
||
368 | */ |
||
369 | public function getUseStrictTransportSecurity() |
||
370 | { |
||
371 | return $this->useStrictTransportSecurity; |
||
372 | } |
||
373 | |||
374 | /** |
||
375 | * @param boolean $useStrictTransportSecurity |
||
376 | * |
||
377 | * @return SiteConfiguration |
||
378 | */ |
||
379 | public function setUseStrictTransportSecurity($useStrictTransportSecurity) |
||
380 | { |
||
381 | $this->useStrictTransportSecurity = $useStrictTransportSecurity; |
||
382 | |||
383 | return $this; |
||
384 | } |
||
385 | |||
386 | /** |
||
387 | * @return string |
||
388 | */ |
||
389 | public function getUserAgent() |
||
390 | { |
||
391 | return $this->userAgent; |
||
392 | } |
||
393 | |||
394 | /** |
||
395 | * @param string $userAgent |
||
396 | * |
||
397 | * @return SiteConfiguration |
||
398 | */ |
||
399 | public function setUserAgent($userAgent) |
||
400 | { |
||
401 | $this->userAgent = $userAgent; |
||
402 | |||
403 | return $this; |
||
404 | } |
||
405 | |||
406 | /** |
||
407 | * @return boolean |
||
408 | */ |
||
409 | public function getCurlDisableVerifyPeer() |
||
410 | { |
||
411 | return $this->curlDisableVerifyPeer; |
||
412 | } |
||
413 | |||
414 | /** |
||
415 | * @param boolean $curlDisableVerifyPeer |
||
416 | * |
||
417 | * @return SiteConfiguration |
||
418 | */ |
||
419 | public function setCurlDisableVerifyPeer($curlDisableVerifyPeer) |
||
420 | { |
||
421 | $this->curlDisableVerifyPeer = $curlDisableVerifyPeer; |
||
422 | |||
423 | return $this; |
||
424 | } |
||
425 | |||
426 | /** |
||
427 | * @return boolean |
||
428 | */ |
||
429 | public function getUseOAuthSignup() |
||
430 | { |
||
431 | return $this->useOAuthSignup; |
||
432 | } |
||
433 | |||
434 | /** |
||
435 | * @param boolean $useOAuthSignup |
||
436 | * |
||
437 | * @return SiteConfiguration |
||
438 | */ |
||
439 | public function setUseOAuthSignup($useOAuthSignup) |
||
440 | { |
||
441 | $this->useOAuthSignup = $useOAuthSignup; |
||
442 | |||
443 | return $this; |
||
444 | } |
||
445 | |||
446 | /** |
||
447 | * @return mixed |
||
448 | */ |
||
449 | public function getOAuthConsumerToken() |
||
450 | { |
||
451 | return $this->oauthConsumerToken; |
||
452 | } |
||
453 | |||
454 | /** |
||
455 | * @param mixed $oauthConsumerToken |
||
456 | * |
||
457 | * @return SiteConfiguration |
||
458 | */ |
||
459 | public function setOAuthConsumerToken($oauthConsumerToken) |
||
460 | { |
||
461 | $this->oauthConsumerToken = $oauthConsumerToken; |
||
462 | |||
463 | return $this; |
||
464 | } |
||
465 | |||
466 | /** |
||
467 | * @return mixed |
||
468 | */ |
||
469 | public function getOAuthConsumerSecret() |
||
470 | { |
||
471 | return $this->oauthConsumerSecret; |
||
472 | } |
||
473 | |||
474 | /** |
||
475 | * @param mixed $oauthConsumerSecret |
||
476 | * |
||
477 | * @return SiteConfiguration |
||
478 | */ |
||
479 | public function setOAuthConsumerSecret($oauthConsumerSecret) |
||
480 | { |
||
481 | $this->oauthConsumerSecret = $oauthConsumerSecret; |
||
482 | |||
483 | return $this; |
||
484 | } |
||
485 | |||
486 | /** |
||
487 | * @return string |
||
488 | */ |
||
489 | public function getDataClearInterval() |
||
490 | { |
||
491 | return $this->dataClearInterval; |
||
492 | } |
||
493 | |||
494 | /** |
||
495 | * @param string $dataClearInterval |
||
496 | * |
||
497 | * @return SiteConfiguration |
||
498 | */ |
||
499 | public function setDataClearInterval($dataClearInterval) |
||
500 | { |
||
501 | $this->dataClearInterval = $dataClearInterval; |
||
502 | |||
503 | return $this; |
||
504 | } |
||
505 | |||
506 | /** |
||
507 | * @return string |
||
508 | */ |
||
509 | public function getXffTrustedHostsFile() |
||
510 | { |
||
511 | return $this->xffTrustedHostsFile; |
||
512 | } |
||
513 | |||
514 | /** |
||
515 | * @param string $xffTrustedHostsFile |
||
516 | * |
||
517 | * @return SiteConfiguration |
||
518 | */ |
||
519 | public function setXffTrustedHostsFile($xffTrustedHostsFile) |
||
520 | { |
||
521 | $this->xffTrustedHostsFile = $xffTrustedHostsFile; |
||
522 | |||
523 | return $this; |
||
524 | } |
||
525 | |||
526 | /** |
||
527 | * @return array |
||
528 | */ |
||
529 | public function getCrossOriginResourceSharingHosts() |
||
530 | { |
||
531 | return $this->crossOriginResourceSharingHosts; |
||
532 | } |
||
533 | |||
534 | /** |
||
535 | * @param array $crossOriginResourceSharingHosts |
||
536 | * |
||
537 | * @return SiteConfiguration |
||
538 | */ |
||
539 | public function setCrossOriginResourceSharingHosts($crossOriginResourceSharingHosts) |
||
540 | { |
||
541 | $this->crossOriginResourceSharingHosts = $crossOriginResourceSharingHosts; |
||
542 | |||
543 | return $this; |
||
544 | } |
||
545 | |||
546 | /** |
||
547 | * @return boolean |
||
548 | */ |
||
549 | public function getIrcNotificationsEnabled() |
||
550 | { |
||
551 | return $this->ircNotificationsEnabled; |
||
552 | } |
||
553 | |||
554 | /** |
||
555 | * @param boolean $ircNotificationsEnabled |
||
556 | * |
||
557 | * @return SiteConfiguration |
||
558 | */ |
||
559 | public function setIrcNotificationsEnabled($ircNotificationsEnabled) |
||
560 | { |
||
561 | $this->ircNotificationsEnabled = $ircNotificationsEnabled; |
||
562 | |||
563 | return $this; |
||
564 | } |
||
565 | |||
566 | /** |
||
567 | * @param string $errorLog |
||
568 | * |
||
569 | * @return SiteConfiguration |
||
570 | */ |
||
571 | public function setErrorLog($errorLog) |
||
572 | { |
||
573 | $this->errorLog = $errorLog; |
||
574 | |||
575 | return $this; |
||
576 | } |
||
577 | |||
578 | /** |
||
579 | * @return string |
||
580 | */ |
||
581 | public function getErrorLog() |
||
582 | { |
||
583 | return $this->errorLog; |
||
584 | } |
||
585 | |||
586 | /** |
||
587 | * @param int $emailConfirmationExpiryDays |
||
588 | * |
||
589 | * @return SiteConfiguration |
||
590 | */ |
||
591 | public function setEmailConfirmationExpiryDays($emailConfirmationExpiryDays) |
||
592 | { |
||
593 | $this->emailConfirmationExpiryDays = $emailConfirmationExpiryDays; |
||
594 | |||
595 | return $this; |
||
596 | } |
||
597 | |||
598 | /** |
||
599 | * @return int |
||
600 | */ |
||
601 | public function getEmailConfirmationExpiryDays() |
||
602 | { |
||
603 | return $this->emailConfirmationExpiryDays; |
||
604 | } |
||
605 | |||
606 | /** |
||
607 | * @param string $ircNotificationsInstance |
||
608 | * |
||
609 | * @return SiteConfiguration |
||
610 | */ |
||
611 | public function setIrcNotificationsInstance($ircNotificationsInstance) |
||
612 | { |
||
613 | $this->ircNotificationsInstance = $ircNotificationsInstance; |
||
614 | |||
615 | return $this; |
||
616 | } |
||
617 | |||
618 | /** |
||
619 | * @return string |
||
620 | */ |
||
621 | public function getIrcNotificationsInstance() |
||
622 | { |
||
623 | return $this->ircNotificationsInstance; |
||
624 | } |
||
625 | |||
626 | /** |
||
627 | * @param boolean $titleBlacklistEnabled |
||
628 | * |
||
629 | * @return SiteConfiguration |
||
630 | */ |
||
631 | public function setTitleBlacklistEnabled($titleBlacklistEnabled) |
||
632 | { |
||
633 | $this->titleBlacklistEnabled = $titleBlacklistEnabled; |
||
634 | |||
635 | return $this; |
||
636 | } |
||
637 | |||
638 | /** |
||
639 | * @return boolean |
||
640 | */ |
||
641 | public function getTitleBlacklistEnabled() |
||
642 | { |
||
643 | return $this->titleBlacklistEnabled; |
||
644 | } |
||
645 | |||
646 | /** |
||
647 | * @param string|null $locationProviderApiKey |
||
648 | * |
||
649 | * @return SiteConfiguration |
||
650 | */ |
||
651 | public function setLocationProviderApiKey($locationProviderApiKey) |
||
652 | { |
||
653 | $this->locationProviderApiKey = $locationProviderApiKey; |
||
654 | |||
655 | return $this; |
||
656 | } |
||
657 | |||
658 | /** |
||
659 | * @return null|string |
||
660 | */ |
||
661 | public function getLocationProviderApiKey() |
||
662 | { |
||
663 | return $this->locationProviderApiKey; |
||
664 | } |
||
665 | |||
666 | /** |
||
667 | * @param array $torExitPaths |
||
668 | * |
||
669 | * @return SiteConfiguration |
||
670 | */ |
||
671 | public function setTorExitPaths($torExitPaths) |
||
672 | { |
||
673 | $this->torExitPaths = $torExitPaths; |
||
674 | |||
675 | return $this; |
||
676 | } |
||
677 | |||
678 | /** |
||
679 | * @return array |
||
680 | */ |
||
681 | public function getTorExitPaths() |
||
682 | { |
||
683 | return $this->torExitPaths; |
||
684 | } |
||
685 | |||
686 | /** |
||
687 | * @param string $oauthIdentityGraceTime |
||
688 | * |
||
689 | * @return SiteConfiguration |
||
690 | */ |
||
691 | public function setOauthIdentityGraceTime($oauthIdentityGraceTime) |
||
692 | { |
||
693 | $this->oauthIdentityGraceTime = $oauthIdentityGraceTime; |
||
694 | |||
695 | return $this; |
||
696 | } |
||
697 | |||
698 | /** |
||
699 | * @return string |
||
700 | */ |
||
701 | public function getOauthIdentityGraceTime() |
||
702 | { |
||
703 | return $this->oauthIdentityGraceTime; |
||
704 | } |
||
705 | |||
706 | /** |
||
707 | * @param string $oauthMediaWikiCanonicalServer |
||
708 | * |
||
709 | * @return SiteConfiguration |
||
710 | */ |
||
711 | public function setOauthMediaWikiCanonicalServer($oauthMediaWikiCanonicalServer) |
||
712 | { |
||
713 | $this->oauthMediaWikiCanonicalServer = $oauthMediaWikiCanonicalServer; |
||
714 | |||
715 | return $this; |
||
716 | } |
||
717 | |||
718 | /** |
||
719 | * @return string |
||
720 | */ |
||
721 | public function getOauthMediaWikiCanonicalServer() |
||
722 | { |
||
723 | return $this->oauthMediaWikiCanonicalServer; |
||
724 | } |
||
725 | |||
726 | /** |
||
727 | * @param string $creationBotUsername |
||
728 | * |
||
729 | * @return SiteConfiguration |
||
730 | */ |
||
731 | public function setCreationBotUsername($creationBotUsername) |
||
732 | { |
||
733 | $this->creationBotUsername = $creationBotUsername; |
||
734 | |||
735 | return $this; |
||
736 | } |
||
737 | |||
738 | /** |
||
739 | * @return string |
||
740 | */ |
||
741 | public function getCreationBotUsername() |
||
742 | { |
||
743 | return $this->creationBotUsername; |
||
744 | } |
||
745 | |||
746 | /** |
||
747 | * @param string $creationBotPassword |
||
748 | * |
||
749 | * @return SiteConfiguration |
||
750 | */ |
||
751 | public function setCreationBotPassword($creationBotPassword) |
||
752 | { |
||
753 | $this->creationBotPassword = $creationBotPassword; |
||
754 | |||
755 | return $this; |
||
756 | } |
||
757 | |||
758 | /** |
||
759 | * @return string |
||
760 | */ |
||
761 | public function getCreationBotPassword() |
||
762 | { |
||
763 | return $this->creationBotPassword; |
||
764 | } |
||
765 | |||
766 | /** |
||
767 | * @param string|null $curlCookieJar |
||
768 | * |
||
769 | * @return SiteConfiguration |
||
770 | */ |
||
771 | public function setCurlCookieJar($curlCookieJar) |
||
772 | { |
||
773 | $this->curlCookieJar = $curlCookieJar; |
||
774 | |||
775 | return $this; |
||
776 | } |
||
777 | |||
778 | /** |
||
779 | * @return string|null |
||
780 | */ |
||
781 | public function getCurlCookieJar() |
||
782 | { |
||
783 | return $this->curlCookieJar; |
||
784 | } |
||
785 | |||
786 | public function getYubicoApiId() |
||
787 | { |
||
788 | return $this->yubicoApiId; |
||
789 | } |
||
790 | |||
791 | public function setYubicoApiId($id) |
||
792 | { |
||
793 | $this->yubicoApiId = $id; |
||
794 | |||
795 | return $this; |
||
796 | } |
||
797 | |||
798 | public function getYubicoApiKey() |
||
799 | { |
||
800 | return $this->yubicoApiKey; |
||
801 | } |
||
802 | |||
803 | public function setYubicoApiKey($key) |
||
804 | { |
||
805 | $this->yubicoApiKey = $key; |
||
806 | |||
807 | return $this; |
||
808 | } |
||
809 | |||
810 | /** |
||
811 | * @return string |
||
812 | */ |
||
813 | public function getTotpEncryptionKey() |
||
814 | { |
||
815 | return $this->totpEncryptionKey; |
||
816 | } |
||
817 | |||
818 | /** |
||
819 | * @param string $totpEncryptionKey |
||
820 | * |
||
821 | * @return SiteConfiguration |
||
822 | */ |
||
823 | public function setTotpEncryptionKey($totpEncryptionKey) |
||
824 | { |
||
825 | $this->totpEncryptionKey = $totpEncryptionKey; |
||
826 | |||
827 | return $this; |
||
828 | } |
||
829 | |||
830 | /** |
||
831 | * @return string |
||
832 | */ |
||
833 | public function getIdentificationNoticeboardPage() |
||
834 | { |
||
835 | return $this->identificationNoticeboardPage; |
||
836 | } |
||
837 | |||
838 | /** |
||
839 | * @param string $identificationNoticeboardPage |
||
840 | * |
||
841 | * @return SiteConfiguration |
||
842 | */ |
||
843 | public function setIdentificationNoticeboardPage($identificationNoticeboardPage) |
||
844 | { |
||
845 | $this->identificationNoticeboardPage = $identificationNoticeboardPage; |
||
846 | |||
847 | return $this; |
||
848 | } |
||
849 | |||
850 | public function setIdentificationNoticeboardWebserviceEndpoint(string $identificationNoticeboardWebserviceEndpoint |
||
851 | ): SiteConfiguration { |
||
852 | $this->identificationNoticeboardWebserviceEndpoint = $identificationNoticeboardWebserviceEndpoint; |
||
853 | |||
854 | return $this; |
||
855 | } |
||
856 | |||
857 | public function getIdentificationNoticeboardWebserviceEndpoint(): string |
||
858 | { |
||
859 | return $this->identificationNoticeboardWebserviceEndpoint; |
||
860 | } |
||
861 | |||
862 | public function isRegistrationAllowed(): bool |
||
863 | { |
||
864 | return $this->registrationAllowed; |
||
865 | } |
||
866 | |||
867 | public function setRegistrationAllowed(bool $registrationAllowed): SiteConfiguration |
||
868 | { |
||
869 | $this->registrationAllowed = $registrationAllowed; |
||
870 | |||
871 | return $this; |
||
872 | } |
||
873 | |||
874 | /** |
||
875 | * @return string|null |
||
876 | */ |
||
877 | public function getCspReportUri() |
||
878 | { |
||
879 | return $this->cspReportUri; |
||
880 | } |
||
881 | |||
882 | /** |
||
883 | * @param string|null $cspReportUri |
||
884 | * |
||
885 | * @return SiteConfiguration |
||
886 | */ |
||
887 | public function setCspReportUri($cspReportUri) |
||
888 | { |
||
889 | $this->cspReportUri = $cspReportUri; |
||
890 | |||
891 | return $this; |
||
892 | } |
||
893 | |||
894 | /** |
||
895 | * @return int |
||
896 | */ |
||
897 | public function getResourceCacheEpoch(): int |
||
898 | { |
||
899 | return $this->resourceCacheEpoch; |
||
900 | } |
||
901 | |||
902 | /** |
||
903 | * @param int $resourceCacheEpoch |
||
904 | * |
||
905 | * @return SiteConfiguration |
||
906 | */ |
||
907 | public function setResourceCacheEpoch(int $resourceCacheEpoch): SiteConfiguration |
||
908 | { |
||
909 | $this->resourceCacheEpoch = $resourceCacheEpoch; |
||
910 | |||
911 | return $this; |
||
912 | } |
||
913 | |||
914 | /** |
||
915 | * @return array |
||
916 | */ |
||
917 | public function getCommonEmailDomains(): array |
||
918 | { |
||
919 | return $this->commonEmailDomains; |
||
920 | } |
||
921 | |||
922 | /** |
||
923 | * @param array $commonEmailDomains |
||
924 | * |
||
925 | * @return SiteConfiguration |
||
926 | */ |
||
927 | public function setCommonEmailDomains(array $commonEmailDomains): SiteConfiguration |
||
928 | { |
||
929 | $this->commonEmailDomains = $commonEmailDomains; |
||
930 | |||
931 | return $this; |
||
932 | } |
||
933 | |||
934 | /** |
||
935 | * @param int[] $banMaxIpBlockRange |
||
936 | * |
||
937 | * @return SiteConfiguration |
||
938 | */ |
||
939 | public function setBanMaxIpBlockRange(array $banMaxIpBlockRange): SiteConfiguration |
||
940 | { |
||
941 | $this->banMaxIpBlockRange = $banMaxIpBlockRange; |
||
942 | |||
943 | return $this; |
||
944 | } |
||
945 | |||
946 | /** |
||
947 | * @return int[] |
||
948 | */ |
||
949 | public function getBanMaxIpBlockRange(): array |
||
950 | { |
||
951 | return $this->banMaxIpBlockRange; |
||
952 | } |
||
953 | |||
954 | /** |
||
955 | * @param int[] $banMaxIpRange |
||
956 | * |
||
957 | * @return SiteConfiguration |
||
958 | */ |
||
959 | public function setBanMaxIpRange(array $banMaxIpRange): SiteConfiguration |
||
960 | { |
||
961 | $this->banMaxIpRange = $banMaxIpRange; |
||
962 | |||
963 | return $this; |
||
964 | } |
||
965 | |||
966 | /** |
||
967 | * @return int[] |
||
968 | */ |
||
969 | public function getBanMaxIpRange(): array |
||
970 | { |
||
971 | return $this->banMaxIpRange; |
||
972 | } |
||
973 | |||
974 | /** |
||
975 | * @param array $oauthLegacyConsumerTokens |
||
976 | * |
||
977 | * @return SiteConfiguration |
||
978 | */ |
||
979 | public function setOauthLegacyConsumerTokens(array $oauthLegacyConsumerTokens): SiteConfiguration |
||
980 | { |
||
981 | $this->oauthLegacyConsumerTokens = $oauthLegacyConsumerTokens; |
||
982 | |||
983 | return $this; |
||
984 | } |
||
985 | |||
986 | /** |
||
987 | * @return array |
||
988 | */ |
||
989 | public function getOauthLegacyConsumerTokens(): array |
||
992 | } |
||
993 | |||
994 | /** |
||
995 | * @return int |
||
996 | */ |
||
997 | public function getJobQueueBatchSize(): int |
||
998 | { |
||
999 | return $this->jobQueueBatchSize; |
||
1000 | } |
||
1001 | |||
1002 | /** |
||
1003 | * @param int $jobQueueBatchSize |
||
1004 | * |
||
1005 | * @return SiteConfiguration |
||
1006 | */ |
||
1007 | public function setJobQueueBatchSize(int $jobQueueBatchSize): SiteConfiguration |
||
1008 | { |
||
1009 | $this->jobQueueBatchSize = $jobQueueBatchSize; |
||
1010 | |||
1011 | return $this; |
||
1012 | } |
||
1013 | |||
1014 | /** |
||
1015 | * @return array |
||
1016 | */ |
||
1017 | public function getAmqpConfiguration(): array |
||
1018 | { |
||
1019 | return $this->amqpConfiguration; |
||
1020 | } |
||
1021 | |||
1022 | /** |
||
1023 | * @param array $amqpConfiguration |
||
1024 | * |
||
1025 | * @return SiteConfiguration |
||
1026 | */ |
||
1027 | public function setAmqpConfiguration(array $amqpConfiguration): SiteConfiguration |
||
1028 | { |
||
1029 | $this->amqpConfiguration = $amqpConfiguration; |
||
1030 | |||
1031 | return $this; |
||
1032 | } |
||
1033 | |||
1034 | /** |
||
1035 | * @return string |
||
1036 | */ |
||
1037 | public function getEmailSender(): string |
||
1040 | } |
||
1041 | |||
1042 | /** |
||
1043 | * @param string $emailSender |
||
1044 | * |
||
1045 | * @return SiteConfiguration |
||
1046 | */ |
||
1047 | public function setEmailSender(string $emailSender): SiteConfiguration |
||
1048 | { |
||
1049 | $this->emailSender = $emailSender; |
||
1050 | |||
1051 | return $this; |
||
1052 | } |
||
1053 | |||
1054 | /** |
||
1055 | * @param array $acceptClientHints |
||
1056 | * |
||
1057 | * @return SiteConfiguration |
||
1058 | */ |
||
1059 | public function setAcceptClientHints(array $acceptClientHints): SiteConfiguration |
||
1060 | { |
||
1061 | $this->acceptClientHints = $acceptClientHints; |
||
1062 | |||
1063 | return $this; |
||
1064 | } |
||
1065 | |||
1066 | /** |
||
1067 | * @return array |
||
1068 | */ |
||
1069 | public function getAcceptClientHints(): array |
||
1070 | { |
||
1071 | return $this->acceptClientHints; |
||
1072 | } |
||
1073 | |||
1074 | public function setCookiePath(string $cookiePath): SiteConfiguration |
||
1075 | { |
||
1076 | $this->cookiePath = $cookiePath; |
||
1077 | |||
1078 | return $this; |
||
1079 | } |
||
1080 | |||
1081 | public function getCookiePath(): string |
||
1082 | { |
||
1083 | return $this->cookiePath; |
||
1084 | } |
||
1085 | |||
1086 | public function setCookieSessionName(string $cookieSessionName): SiteConfiguration |
||
1087 | { |
||
1088 | $this->cookieSessionName = $cookieSessionName; |
||
1089 | |||
1090 | return $this; |
||
1091 | } |
||
1092 | |||
1093 | public function getCookieSessionName(): string |
||
1094 | { |
||
1095 | return $this->cookieSessionName; |
||
1096 | } |
||
1097 | |||
1098 | public function setOffline(array $offline): SiteConfiguration |
||
1099 | { |
||
1100 | $this->offline = $offline; |
||
1101 | |||
1102 | return $this; |
||
1103 | } |
||
1104 | |||
1105 | public function getOffline(): array |
||
1108 | } |
||
1109 | |||
1110 | public function setDatabaseConfig(array $databaseConfig): SiteConfiguration |
||
1111 | { |
||
1112 | $this->databaseConfig = $databaseConfig; |
||
1113 | |||
1114 | return $this; |
||
1115 | } |
||
1116 | |||
1117 | public function getDatabaseConfig(): array |
||
1118 | { |
||
1119 | return $this->databaseConfig; |
||
1120 | } |
||
1121 | |||
1122 | public function getPrivacyStatementPath(): string |
||
1123 | { |
||
1124 | return $this->privacyStatementPath; |
||
1125 | } |
||
1126 | |||
1127 | public function setPrivacyStatementPath(string $privacyStatementPath): SiteConfiguration |
||
1128 | { |
||
1129 | $this->privacyStatementPath = $privacyStatementPath; |
||
1130 | |||
1131 | return $this; |
||
1132 | } |
||
1133 | |||
1134 | public function getCreateAccountLink(): string |
||
1135 | { |
||
1136 | return $this->createAccountLink; |
||
1137 | } |
||
1138 | |||
1139 | public function setCreateAccountLink(string $createAccountLink): SiteConfiguration |
||
1140 | { |
||
1141 | $this->createAccountLink = $createAccountLink; |
||
1142 | |||
1143 | return $this; |
||
1144 | } |
||
1145 | } |
||
1146 |