Copied!

AbstractPaginatedResult

AbstractPaginatedResult.php : 23
Read-only
Abstract

Base of the results returned by paginated tools, see {@see PaginationInput}.

Each tool returns a final subclass binding the item type, e.g. @extends AbstractPaginatedResult<ContentType> on an otherwise empty class. The item type then appears in the generated output schema, which a tool returning this class directly could not get. PHPStan reports a subclass that does not bind the item type.

Tags
Experimental

Properties

public $items

AbstractPaginatedResult.php : 31

Items on the requested page, in the order of the full result.

public array<string|int, mixed> $items

public $totalCount

AbstractPaginatedResult.php : 33

Total number of items across all pages, regardless of the requested limit and offset.

public int $totalCount

Methods

public__construct()

AbstractPaginatedResult.php : 29
public __construct(array<int, TItem> $items, int<0, max> $totalCount)

Parameters

Name Type Default value Description
$items array<int, TItem> - -
$totalCount int<0, max> - -