Server
in package
Tags
Table of Contents
Constants
- PROTOCOL_VERSION : mixed = '2024-11-05'
Methods
- handle_message() : array<string|int, mixed>|null
- Dispatches one decoded JSON-RPC message and returns the response to write back, or null when nothing should be written (a notification, i.e. a message with no "id").
Constants
PROTOCOL_VERSION
public
mixed
PROTOCOL_VERSION
= '2024-11-05'
Methods
handle_message()
Dispatches one decoded JSON-RPC message and returns the response to write back, or null when nothing should be written (a notification, i.e. a message with no "id").
public
static handle_message(array<string|int, mixed> $message, array<string|int, mixed> $context) : array<string|int, mixed>|null
Parameters
- $message : array<string|int, mixed>
-
Decoded JSON-RPC request/notification.
- $context : array<string|int, mixed>
-
['transport'=>'stdio'|'http', 'is_admin'=>bool, 'user_id'=>int|null, 'login'=>string|null]