| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | /** |
| 6: | * This file is part of the Nexus MCP SDK package. |
| 7: | * |
| 8: | * (c) 2025 John Paul E. Balandan, CPA <paulbalandan@gmail.com> |
| 9: | * |
| 10: | * For the full copyright and license information, please view |
| 11: | * the LICENSE file that was distributed with this source code. |
| 12: | */ |
| 13: | |
| 14: | namespace Nexus\Mcp\Schema\Result; |
| 15: | |
| 16: | /** |
| 17: | * The base object for paginated results. |
| 18: | * |
| 19: | * @template T of array{ |
| 20: | * _meta?: array<string, mixed>, |
| 21: | * nextCursor?: null|non-empty-string, |
| 22: | * } |
| 23: | * |
| 24: | * @extends Result<T> |
| 25: | */ |
| 26: | abstract readonly class PaginatedResult extends Result |
| 27: | { |
| 28: | /** |
| 29: | * @param null|non-empty-string $nextCursor An opaque token representing the pagination position after the |
| 30: | * last returned result. If present, there may be more results available. |
| 31: | */ |
| 32: | public function __construct( |
| 33: | public ?string $nextCursor = null, |
| 34: | ?array $meta = null, |
| 35: | ) { |
| 36: | parent::__construct($meta); |
| 37: | } |
| 38: | } |
| 39: |