API / Minn\Content / Page

Page final readonly class

Minn\Content\Page · public/minn/src/Minn/Content/Page.php · 43 lines

One page of a listing: the rows on it and how many rows the whole listing has, which is what pagination is counted from.

Constants and properties

propreadonly array $posts

Promoted from the constructor.

propreadonly int $total

Promoted from the constructor.

Public

new__construct(array $posts, int $total)#
$postslist<PostRecord>
staticempty(): self#

No rows and a total of zero.

methodisEmpty(): bool#

Whether the page holds no rows.

methodcount(): int#

How many rows are on this page.

methodids(): array#

The ids of the rows on this page.

@return list<int>
methodtotalPages(int $perPage): int#

How many pages the whole listing makes at this page size.