RequestEnvelope
FinalYes
Stamps the per-request `_meta` that replaces the `initialize` handshake (SEP-2575).
The modern era has no connection-scoped negotiation, so what a handshake would have said once now rides on every message: the revision this request is written against, and what the client can be asked to do while answering it. RequestMeta is the server's reader for the same envelope.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- protocolVersion() : ProtocolVersion
- stamp() : array<string, mixed>
- Merges the envelope into an encoded message, preserving whatever `_meta` the caller already put there — a `progressToken` most of all, which would otherwise be dropped and take every progress notification with it.
- withProtocolVersion() : self
Properties
$capabilities read-only
private
ClientCapabilities
$capabilities
$clientInfo read-only
private
Implementation
$clientInfo
$protocolVersion read-only
private
ProtocolVersion
$protocolVersion
Methods
__construct()
public
__construct(ProtocolVersion $protocolVersion, ClientCapabilities $capabilities, Implementation $clientInfo) : mixed
Parameters
- $protocolVersion : ProtocolVersion
- $capabilities : ClientCapabilities
- $clientInfo : Implementation
protocolVersion()
public
protocolVersion() : ProtocolVersion
Return values
ProtocolVersionstamp()
Merges the envelope into an encoded message, preserving whatever `_meta` the caller already put there — a `progressToken` most of all, which would otherwise be dropped and take every progress notification with it.
public
stamp(array<string, mixed> $payload) : array<string, mixed>
Parameters
- $payload : array<string, mixed>
-
a serialized JSON-RPC message
Return values
array<string, mixed>withProtocolVersion()
public
withProtocolVersion(ProtocolVersion $protocolVersion) : self
Parameters
- $protocolVersion : ProtocolVersion