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.
Uses 1
Constants and properties
| prop | readonly array $posts | Promoted from the constructor. |
| prop | readonly int $total | Promoted from the constructor. |
Public
| new | __construct(array $posts, int $total)# |
| |||
| static | empty(): self# | No rows and a total of zero. | |||
| method | isEmpty(): bool# | Whether the page holds no rows. | |||
| method | count(): int# | How many rows are on this page. | |||
| method | ids(): array# | The ids of the rows on this page. @return list<int> | |||
| method | totalPages(int $perPage): int# | How many pages the whole listing makes at this page size. |
Nothing matches.