This commit is contained in:
as2252258@163.com
2021-05-04 02:40:56 +08:00
parent 871226c2ec
commit da1d8439c6
+6 -6
View File
@@ -24,9 +24,9 @@ class Context extends BaseContext
*/ */
public static function setContext($id, $context, $key = null): mixed public static function setContext($id, $context, $key = null): mixed
{ {
if (!static::inCoroutine()) { // if (!static::inCoroutine()) {
return static::setStatic($id, $context, $key); // return static::setStatic($id, $context, $key);
} // }
return self::setCoroutine($id, $context, $key); return self::setCoroutine($id, $context, $key);
} }
@@ -106,9 +106,9 @@ class Context extends BaseContext
*/ */
public static function getContext($id, $key = null): mixed public static function getContext($id, $key = null): mixed
{ {
if (!static::inCoroutine()) { // if (!static::inCoroutine()) {
return static::loadByStatic($id, $key); // return static::loadByStatic($id, $key);
} // }
return static::loadByContext($id, $key); return static::loadByContext($id, $key);
} }