Completed
Push — irc-link-update ( 5c98e1 )
by Simon
17s queued 13s
created

SiteConfiguration::getJobQueueBatchSize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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