Passed
Push — dependabot/composer/squizlabs/... ( b689d5...f9f311 )
by
unknown
14:25 queued 10:31
created

SiteConfiguration::getPrivacyStatementPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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