protocolWriter = $protocolWriter; } /** * The show message notification is sent from a server to a client to ask the client to display a particular message in the user interface. * * @param int $type * @param string $message */ public function showMessage(int $type, string $message) { $this->protocolWriter->write(new Message(new NotificationBody( 'window/showMessage', (object)[ 'type' => $type, 'message' => $message ] ))); } /** * The log message notification is sent from the server to the client to ask the client to log a particular message. * * @param int $type * @param string $message */ public function logMessage(int $type, string $message) { $this->protocolWriter->write(new Message(new NotificationBody( 'window/logMessage', (object)[ 'type' => $type, 'message' => $message ] ))); } }