final |
|---|
Parses decoded JSON-RPC envelopes into concrete message objects.
| Methods | ||
|---|---|---|
public
|
__construct(
array<non-empty-string, class-string<JsonRpcRequest<non-empty-string>>> $requests = [],
array<non-empty-string, class-string<JsonRpcNotification<non-empty-string>>> $notifications = [],
)
|
# |
public
|
parse<T is Result = Result>(
array<string, mixed> $message,
null|class-string<T> $result = null,
): ($result is null ? JsonRpcErrorResponse|JsonRpcNotification<non-empty-string>|JsonRpcRequest<non-empty-string>|UnparsedResultEnvelope : JsonRpcErrorResponse|JsonRpcNotification<non-empty-string>|JsonRpcRequest<non-empty-string>|JsonRpcResultResponse<T>)
|
# |