This commit is contained in:
2021-02-20 13:08:54 +08:00
parent d05cb47f66
commit 163c823d25
6 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -55,7 +55,7 @@ class Config extends Component
*/
public static function get($key, $try = FALSE, $default = null): mixed
{
$instance = Snowflake::app()->config->getData();
$instance = Snowflake::app()->getConfig()->getData();
if (!str_contains($key, '.')) {
return isset($instance[$key]) ? $instance[$key] : $default;
}
@@ -85,7 +85,7 @@ class Config extends Component
*/
public static function set($key, $value): mixed
{
$config = Snowflake::app()->config;
$config = Snowflake::app()->getConfig();
return $config->setData($key, $value);
}
@@ -96,7 +96,7 @@ class Config extends Component
*/
public static function has($key, $must_not_null = false): bool
{
$config = Snowflake::app()->config;
$config = Snowflake::app()->getConfig();
if (!isset($config->data[$key])) {
return false;
}