BoothItemSearchresult
in package
FinalYes
Value object for booth item search results including pagination metadata.
Table of Contents
Properties
Methods
- __construct() : mixed
- items() : array<string|int, BoothItem>
- Items for the current page.
- page() : int
- Current page number (1-based).
- perPage() : int
- Items per page.
- total() : int
- Total items across all pages.
- totalPages() : int
- Number of pages, derived from total and perPage.
Properties
$items
private
array<string|int, BoothItem>
$items
$page
private
int
$page
$perPage
private
int
$perPage
$total
private
int
$total
Methods
__construct()
public
__construct(array<string|int, BoothItem> $items[, int|null $total = null ][, int $page = 1 ][, int|null $perPage = null ]) : mixed
Parameters
- $items : array<string|int, BoothItem>
-
Current page of items.
- $total : int|null = null
-
Total items across all pages (fallback: count of $items).
- $page : int = 1
-
Current page number (1-based).
- $perPage : int|null = null
-
Items per page (fallback: $total or count of $items, min 1).
items()
Items for the current page.
public
items() : array<string|int, BoothItem>
Return values
array<string|int, BoothItem>page()
Current page number (1-based).
public
page() : int
Return values
intperPage()
Items per page.
public
perPage() : int
Return values
inttotal()
Total items across all pages.
public
total() : int
Return values
inttotalPages()
Number of pages, derived from total and perPage.
public
totalPages() : int