public static function setContextData(array $contextData = [])
    {
        $existContext = [];
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId][self::DATA_KEY])) {
            $existContext = self::$context[$coroutineId][self::DATA_KEY];
        }
        self::$context[$coroutineId][self::DATA_KEY] = ArrayHelper::merge($contextData, $existContext);
    }
public static function setContextData(array $contextData = [])
    {
        $existContext = [];
        $coroutineId = self::getCoroutineId();
        if (isset(self::$context[$coroutineId][self::DATA_KEY])) {
            $existContext = self::$context[$coroutineId][self::DATA_KEY];
        }
        self::$context[$coroutineId][self::DATA_KEY] = ArrayHelper::merge($contextData, $existContext);
    }
public static function setContextData ( array $ contextData = [ ] ) { $ existContext = [ ] ; $ coroutineId = self :: getCoroutineId ( ) ; if ( isset ( self :: $ context [ $ coroutineId ] [ self :: DATA_KEY ] ) ) { $ existContext = self :: $ context [ $ coroutineId ] [ self :: DATA_KEY ] ; } self :: $ context [ $ coroutineId ] [ self :: DATA_KEY ] = ArrayHelper :: merge ( $ contextData , $ existContext ) ; }
Set the context data

@param array $contextData
Set the context data