| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | namespace Nexus\Mcp\Core\Schema\RequestParams; |
| 15: | |
| 16: | use Nexus\Mcp\Core\Schema\RequestMetaObject; |
| 17: | use Nexus\Mcp\Core\Schema\RequestParams; |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | abstract readonly class ResourceRequestParams extends RequestParams |
| 25: | { |
| 26: | public function __construct(public string $uri, RequestMetaObject $meta = new RequestMetaObject()) |
| 27: | { |
| 28: | parent::__construct($meta); |
| 29: | } |
| 30: | |
| 31: | #[\Override] |
| 32: | public function toArray(): array |
| 33: | { |
| 34: | return [ |
| 35: | ...parent::toArray(), |
| 36: | 'uri' => $this->uri, |
| 37: | ]; |
| 38: | } |
| 39: | |
| 40: | #[\Override] |
| 41: | public function jsonSerialize(): array |
| 42: | { |
| 43: | return $this->toArray(); |
| 44: | } |
| 45: | } |
| 46: | |