| Methods |
public
|
__construct()
|
#
|
public
|
setClientInfo(
string $name,
string $version,
?string $title = null,
?string $description = null,
?string $websiteUrl = null,
null|list<Icon> $icons = null,
): self
|
#
|
public
|
setLogger(LoggerInterface $logger): self
|
#
|
public
|
setRequestIdFactory(Closure(): (int|non-empty-string) $factory): self
Overrides the default monotonically-incrementing integer factory.
Overrides the default monotonically-incrementing integer factory.
|
#
|
public
|
setProgressTokenFactory(Closure(): (int|non-empty-string) $factory): self
Overrides the default progress-token factory used by Client::callTool()
when an onProgress callback is supplied.
Overrides the default progress-token factory used by Client::callTool()
when an onProgress callback is supplied.
|
#
|
public
|
addRequestHandler(
non-empty-string $method,
RequestHandlerInterface<non-empty-string, Result, ClientContext> $handler,
): self
Registers a handler for an inbound request method the peer may send to the client.
Registers a handler for an inbound request method the peer may send to the client.
|
#
|
public
|
addNotificationHandler(non-empty-string $method, NotificationHandlerInterface<non-empty-string> $handler): self
Registers a handler for an inbound notification method.
Registers a handler for an inbound notification method.
|
#
|
public
|
build(): Client
|
#
|