MCP PHP SDK

ExplicitElementLoader implements LoaderInterface

FinalYes

Translates `Builder::add()` definition+handler pairs into Registry entries.

Each registered closure is bound to ReferenceHandler as its scope so the reference handler short-circuits reflection and invokes it with the raw argument bag.

Tags
author

Mateu Aguiló Bosch mateu.aguilo.bosch@gmail.com

Table of Contents

Interfaces

LoaderInterface

Properties

$prompts  : array<string|int, mixed>
$resources  : array<string|int, mixed>
$resourceTemplates  : array<string|int, mixed>
$tools  : array<string|int, mixed>

Methods

__construct()  : mixed
load()  : void
boundClosure()  : Closure

Properties

Methods

__construct()

public __construct([array<int, ToolHandlerInterface}$tools = [] ][, array<int, ResourceHandlerInterface}$resources = [] ][, array<int, ProviderInterface>}$resourceTemplates = [] ][, array<int, ProviderInterface>}$prompts = [] ]) : mixed
Parameters
$tools : array<int, ToolHandlerInterface}> = []
$resources : array<int, ResourceHandlerInterface}> = []
$resourceTemplates : array<int, ProviderInterface>}> = []
$prompts : array<int, ProviderInterface>}> = []

boundClosure()

private boundClosure(Closure $closure) : Closure
Parameters
$closure : Closure
Return values
Closure
On this page

Search results