File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
src/Ubiquity/controllers/admin Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ namespace Ubiquity \controllers \admin ;
3
+
4
+ /**
5
+ * Ubiquity\controllers\admin$ServicesChecker
6
+ * This class is part of Ubiquity
7
+ *
8
+ * @author jc
9
+ * @version 1.0.0
10
+ *
11
+ */
12
+ class ServicesChecker {
13
+
14
+ public static function hasSecurity (): bool {
15
+ return \class_exists ('\\Ubiquity \\security \\csrf \\CsrfManager ' );
16
+ }
17
+
18
+ public static function hasShieldon (): bool {
19
+ return \class_exists ('\\Shieldon \\Container ' );
20
+ }
21
+
22
+ public static function isCsrfStarted (): bool {
23
+ if (self ::hasSecurity ()) {
24
+ return \Ubiquity \security \csrf \CsrfManager::isStarted ();
25
+ }
26
+ return false ;
27
+ }
28
+
29
+ public static function isEncryptionStarted () {
30
+ if (self ::hasSecurity ()) {
31
+ return \Ubiquity \security \data \EncryptionManager::isStarted ();
32
+ }
33
+ return false ;
34
+ }
35
+
36
+ public static function isShieldonStarted (): bool {
37
+ if (self ::hasShieldon ()) {
38
+ return \Shieldon \Container::get ('firewall ' ) !== null ;
39
+ }
40
+ return false ;
41
+ }
42
+ }
43
+
You can’t perform that action at this time.
0 commit comments