MCP PHP SDK

Notification implements HasMethodInterface, MessageInterface

AbstractYes
Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Interfaces

HasMethodInterface
Interface for all incoming JSON-RPC messages that should be processed by a handler, and are expected to have a method.
MessageInterface
Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.

Properties

$meta  : array<string, mixed>|null

Methods

fromArray()  : self
getMethod()  : string
jsonSerialize()  : NotificationData
fromParams()  : self
getParams()  : array<string, mixed>|null

Properties

Methods

fromArray()

public static fromArray(NotificationData $data) : self
Parameters
$data : NotificationData
Return values
self

getMethod()

public abstract static getMethod() : string
Return values
string

jsonSerialize()

public jsonSerialize() : NotificationData
Return values
NotificationData

fromParams()

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

getParams()

protected abstract getParams() : array<string, mixed>|null
Return values
array<string, mixed>|null

        
On this page

Search results