MCP PHP SDK

ResourceSubscribeRequest extends Request

FinalYes

Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Properties

$uri  : string
$id  : string|int
$meta  : array<string, mixed>|null

Methods

__construct()  : mixed
fromArray()  : static
getId()  : string|int
getMeta()  : array<string, mixed>|null
getMethod()  : string
jsonSerialize()  : RequestData
withId()  : static
withMeta()  : static
fromParams()  : static
getParams()  : array{uri: non-empty-string}

Properties

$meta

protected array<string, mixed>|null $meta = null

Methods

__construct()

public __construct(non-empty-string $uri) : mixed
Parameters
$uri : non-empty-string

the URI of the resource to subscribe to

fromArray()

public static fromArray(RequestData $data) : static
Parameters
$data : RequestData
Return values
static

getId()

public getId() : string|int
Return values
string|int

getMeta()

public getMeta() : array<string, mixed>|null
Return values
array<string, mixed>|null

jsonSerialize()

public jsonSerialize() : RequestData
Return values
RequestData

withId()

public withId(string|int $id) : static
Parameters
$id : string|int
Return values
static

withMeta()

public withMeta(array<string, mixed>|null $meta) : static
Parameters
$meta : array<string, mixed>|null
Return values
static

fromParams()

protected static fromParams(array<string|int, mixed>|null $params) : static
Parameters
$params : array<string|int, mixed>|null
Return values
static

getParams()

protected getParams() : array{uri: non-empty-string}
Return values
array{uri: non-empty-string}

        
On this page

Search results