php-sdk/src/Schema/JsonRpc/HasMethodInterface.php
2025-08-29 11:19:51 +02:00

27 lines
676 B
PHP

<?php
/*
* 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;
}