function onMessage(ConnectionInterface $from, $msg) { $callable = $this->target; $callable($from, new NetworkMessage($msg)); }