MCP PHP SDK

RegistryChangePublisher

FinalYes

Turns the registry's own change events into the notifications a `subscriptions/listen` stream carries.

The registry already announces every mutation to the PSR-14 dispatcher; this is the adapter that puts them where a stream can read them, so a runtime registerTool() reaches a listening client without the caller knowing a bus exists.

There is no template-list notification in the protocol, so a changed resource-template list is announced as a changed resource list — which is what a client would refetch anyway.

Tags
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Properties

$bus  : NotificationBusInterface

Methods

__construct()  : mixed
listeners()  : array<class-string, callable(object): void>
Every event this publisher handles, keyed by event class.
onPromptListChanged()  : void
onResourceListChanged()  : void
onResourceTemplateListChanged()  : void
onToolListChanged()  : void

Properties

Methods

listeners()

Every event this publisher handles, keyed by event class.

public listeners() : array<class-string, callable(object): void>

Shaped for a dispatcher that wants a map; a framework's own subscriber conventions can read it too rather than restating the list.

Return values
array<class-string, callable(object): void>
On this page

Search results