private static function getCoroutineContext(string $key)
    {
        $coroutineId = self::getCoroutineId();
        if (!isset(self::$context[$coroutineId])) {
            return null;
        }

        $coroutineContext = self::$context[$coroutineId];
        if (isset($coroutineContext[$key])) {
            return $coroutineContext[$key];
        }
        return null;
    }
private static function getCoroutineContext(string $key)
    {
        $coroutineId = self::getCoroutineId();
        if (!isset(self::$context[$coroutineId])) {
            return null;
        }

        $coroutineContext = self::$context[$coroutineId];
        if (isset($coroutineContext[$key])) {
            return $coroutineContext[$key];
        }
        return null;
    }
private static function getCoroutineContext ( string $ key ) { $ coroutineId = self :: getCoroutineId ( ) ; if ( ! isset ( self :: $ context [ $ coroutineId ] ) ) { return null ; } $ coroutineContext = self :: $ context [ $ coroutineId ] ; if ( isset ( $ coroutineContext [ $ key ] ) ) { return $ coroutineContext [ $ key ] ; } return null ; }
Get data from coroutine context by key

@param string $key key of context
@return mixed|null
Get data from coroutine context by key