MCP PHP SDK

ReflectedElementLoader implements LoaderInterface

FinalYes
Tags
author

Antoine Bluchet soyuka@gmail.com

phpstan-import-type

Handler from ElementReference

Table of Contents

Interfaces

LoaderInterface

Properties

$logger  : LoggerInterface
$prompts  : array<string|int, mixed>
$resources  : array<string|int, mixed>
$resourceTemplates  : array<string|int, mixed>
$schemaGenerator  : SchemaGeneratorInterface|null
$tools  : array<string|int, mixed>

Methods

__construct()  : mixed
load()  : void
getCompletionProviders()  : array<string, ProviderInterface>|ProviderInterface>
getHandlerDescription()  : string

Properties

Methods

__construct()

public __construct([array<string|int, Icon[], meta: ?array, outputSchema: ?array}> $tools = [] ][, array<string|int, Icon[], meta: ?array}> $resources = [] ][, array<string|int, Annotations, meta: ?array}> $resourceTemplates = [] ][, array<string|int, Icon[], meta: ?array}> $prompts = [] ][, LoggerInterface $logger = new NullLogger() ][, SchemaGeneratorInterface|null $schemaGenerator = null ]) : mixed
Parameters
$tools : array<string|int, Icon[], meta: ?array, outputSchema: ?array}> = []
$resources : array<string|int, Icon[], meta: ?array}> = []
$resourceTemplates : array<string|int, Annotations, meta: ?array}> = []
$prompts : array<string|int, Icon[], meta: ?array}> = []
$logger : LoggerInterface = new NullLogger()
$schemaGenerator : SchemaGeneratorInterface|null = null

getCompletionProviders()

private getCompletionProviders(ReflectionMethod|ReflectionFunction $reflection) : array<string, ProviderInterface>|ProviderInterface>
Parameters
$reflection : ReflectionMethod|ReflectionFunction
Return values
array<string, ProviderInterface>|ProviderInterface>

getHandlerDescription()

private getHandlerDescription(Handler $handler) : string
Parameters
$handler : Handler
Return values
string
On this page

Search results