Adopt Schema component in server handlers
This commit is contained in:
parent
6025f890f9
commit
09707b4798
1 changed files with 1516 additions and 2424 deletions
29
src/Schema/JsonRpc/HasMethodInterface.php
Normal file
29
src/Schema/JsonRpc/HasMethodInterface.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the official PHP MCP SDK.
|
||||
*
|
||||
* A collaboration between Symfony and the PHP Foundation.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Mcp\Schema\JsonRpc;
|
||||
|
||||
/**
|
||||
* Interface for all incoming JSON-RPC messages that should be processed by a handler, and are expected to have a method.
|
||||
*
|
||||
* @author Christopher Hertel <mail@christopher-hertel.de>
|
||||
*/
|
||||
interface HasMethodInterface
|
||||
{
|
||||
public static function getMethod(): string;
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
public static function fromArray(array $data): self;
|
||||
}
|
||||
Loading…
Reference in a new issue