Completed
Push — bantools ( 9f07e0...1cbaa6 )
by
unknown
12:54 queued 09:03
created

SiteConfiguration::setCommonEmailDomains()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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