private static function onReceivedMessage(string $event, $data)
    {
        foreach (self::$onMessage[$event] ?? [] as $callback) {
            asyncCall($callback, $data);
        }
    }
private static function onReceivedMessage(string $event, $data)
    {
        foreach (self::$onMessage[$event] ?? [] as $callback) {
            asyncCall($callback, $data);
        }
    }
private static function onReceivedMessage ( string $ event , $ data ) { foreach ( self :: $ onMessage [ $ event ] ?? [ ] as $ callback ) { asyncCall ( $ callback , $ data ) ; } }
Internal callback triggered when a message is received from the parent.

@param string $event
@param mixed $data
Internal callback triggered when a message is received from the parent .