改名
This commit is contained in:
@@ -173,8 +173,14 @@ class Context extends BaseContext
|
|||||||
public static function hasContext($id, $key = null): bool
|
public static function hasContext($id, $key = null): bool
|
||||||
{
|
{
|
||||||
if (!static::inCoroutine()) {
|
if (!static::inCoroutine()) {
|
||||||
|
if (!isset(static::$_requests[$id]) || empty(static::$_requests[$id])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!empty($key) && !isset(static::$_requests[$id][$key])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!isset(Coroutine::getContext()[$id])) {
|
if (!isset(Coroutine::getContext()[$id])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user