File tree Expand file tree Collapse file tree 1 file changed +21
-9
lines changed
Expand file tree Collapse file tree 1 file changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ trait TraitConfiguration
3030 */
3131 private $ global = false ;
3232 private $ routes = [];
33-
33+
3434 /**
3535 * Init configuration.
3636 */
@@ -42,18 +42,18 @@ public function __construct()
4242 /**
4343 * Prevent object clone.
4444 */
45- public function __clone ()
46- {
47- die (__METHOD__ . ': Clone denied ' );
48- }
45+ public function __clone ()
46+ {
47+ die (__METHOD__ . ': Clone denied ' );
48+ }
4949
5050 /**
5151 * Prevent object serialization.
5252 */
53- public function __wakeup ()
54- {
55- die (__METHOD__ . ': Unserialize denied ' );
56- }
53+ public function __wakeup ()
54+ {
55+ die (__METHOD__ . ': Unserialize denied ' );
56+ }
5757
5858 /**
5959 * Set config Json file,
@@ -716,6 +716,18 @@ protected function isDebug() : bool
716716 return $ this ->global ->options ->debug ;
717717 }
718718
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+
719731 /**
720732 * Get strings.
721733 *
You can’t perform that action at this time.
0 commit comments