public static function getContextDataByKey(string $key, $default = null)
    {
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId][self::DATA_KEY][$key])) {
            return self::$context[$coroutineId][self::DATA_KEY][$key];
        }

        return $default;
    }
public static function getContextDataByKey(string $key, $default = null)
    {
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId][self::DATA_KEY][$key])) {
            return self::$context[$coroutineId][self::DATA_KEY][$key];
        }

        return $default;
    }
public static function getContextDataByKey ( string $ key , $ default = null ) { $ coroutineId = self :: getCoroutineId ( ) ; if ( isset ( self :: $ context [ $ coroutineId ] [ self :: DATA_KEY ] [ $ key ] ) ) { return self :: $ context [ $ coroutineId ] [ self :: DATA_KEY ] [ $ key ] ; } return $ default ; }
Get context data by key

@param string $key
@param mixed $default
@return mixed
Get context data by key