| Methods |
public
|
__construct(
array<non-empty-string, ResourceTemplateEntry> $entries = [],
int $pageSize = CursorPaginator::DEFAULT_PAGE_SIZE,
int $ttlMs = 0,
CacheScope $cacheScope = CacheScope::Private,
)
|
#
|
public
|
onListChanged(Closure $listener): void
Registers a listener invoked once per change to the entries this store lists.
Registers a listener invoked once per change to the entries this store lists.
Implements
|
#
|
public
|
addResourceTemplate(ResourceTemplate $template, TemplatedResourceReaderInterface $reader): void
Registers a template, replacing any template already listed under the same URI template.
Registers a template, replacing any template already listed under the same URI template.
Implements
|
#
|
public
|
removeResourceTemplate(string $uriTemplate): bool
Removes the template listed under $uriTemplate, reporting whether one was listed.
Removes the template listed under $uriTemplate, reporting whether one was listed.
Implements
|
#
|
public
|
list(?Cursor $cursor): ListResourceTemplatesResult
|
#
|
public
|
read(string $uri, ServerContext $context): InputRequiredResult|ReadResourceResult
Reads $uri against the registered templates, returning the result of the
first template that matches.
Reads $uri against the registered templates, returning the result of the
first template that matches.
Implements
|
#
|