Skip to content

Commit cf2761b

Browse files
committed
Update TraitConfiguration.php
1 parent 7f82f01 commit cf2761b

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

src/TraitConfiguration.php

+21-9
Original file line numberDiff line numberDiff 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
*

0 commit comments

Comments
 (0)