File tree 1 file changed +21
-9
lines changed
1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ trait TraitConfiguration
30
30
*/
31
31
private $ global = false ;
32
32
private $ routes = [];
33
-
33
+
34
34
/**
35
35
* Init configuration.
36
36
*/
@@ -42,18 +42,18 @@ public function __construct()
42
42
/**
43
43
* Prevent object clone.
44
44
*/
45
- public function __clone ()
46
- {
47
- die (__METHOD__ . ': Clone denied ' );
48
- }
45
+ public function __clone ()
46
+ {
47
+ die (__METHOD__ . ': Clone denied ' );
48
+ }
49
49
50
50
/**
51
51
* Prevent object serialization.
52
52
*/
53
- public function __wakeup ()
54
- {
55
- die (__METHOD__ . ': Unserialize denied ' );
56
- }
53
+ public function __wakeup ()
54
+ {
55
+ die (__METHOD__ . ': Unserialize denied ' );
56
+ }
57
57
58
58
/**
59
59
* Set config Json file,
@@ -716,6 +716,18 @@ protected function isDebug() : bool
716
716
return $ this ->global ->options ->debug ;
717
717
}
718
718
719
+ /**
720
+ * Get admin status.
721
+ *
722
+ * @access protected
723
+ * @return bool
724
+ */
725
+ protected function isAdmin () : bool
726
+ {
727
+ $ url = Server::getBaseUrl ();
728
+ return $ this ->searchString ($ url , '/admin/ ' );
729
+ }
730
+
719
731
/**
720
732
* Get strings.
721
733
*
You can’t perform that action at this time.
0 commit comments