改名
This commit is contained in:
@@ -64,14 +64,13 @@ class Context extends BaseContext
|
|||||||
if (!static::hasContext($id)) {
|
if (!static::hasContext($id)) {
|
||||||
Coroutine::getContext()[$id] = [];
|
Coroutine::getContext()[$id] = [];
|
||||||
}
|
}
|
||||||
if (!empty($key)) {
|
if (empty($key)) {
|
||||||
if (!is_array(Coroutine::getContext()[$id])) {
|
return Coroutine::getContext()[$id] = $context;
|
||||||
Coroutine::getContext()[$id] = [$key => $context];
|
}
|
||||||
} else {
|
if (!is_array(Coroutine::getContext()[$id])) {
|
||||||
Coroutine::getContext()[$id][$key] = $context;
|
Coroutine::getContext()[$id] = [$key => $context];
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Coroutine::getContext()[$id] = $context;
|
Coroutine::getContext()[$id][$key] = $context;
|
||||||
}
|
}
|
||||||
return $context;
|
return $context;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user