PaginatorFactoryInterface
PaginatorFactoryInterface.php
:
15
Interface
Methods¶
createPaginator()
¶
PaginatorFactoryInterface.php
:
32
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $items | iterable<string|int, object> | - |
the items of the requested page only |
| $range | PageRange | - | - |
| $totalItems | int | - | - |
Return values
PaginatorInterface<string|int, object>
createPartialPaginator()
¶
PaginatorFactoryInterface.php
:
49
Creates the paginator of a collection without a total, for collections whose total is unknown or too costly to count.
|
|
|
The response then has no totalItems.
next is linked when the page is full (as many items as the page size) and $hasNextPage is true, and a page with fewer items never links next.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $items | iterable<string|int, object> | - |
the items of the requested page only |
| $range | PageRange | - | - |
| $hasNextPage | bool | - | - |
Return values
PartialPaginatorInterface<string|int, object>
Tags
getRange()
¶
PaginatorFactoryInterface.php
:
22
|
|
|
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| $operation | Operation | - | - |
| $context | array<string, mixed> | [] | - |
Return values
PageRange|null
null when pagination is disabled for the operation, so the provider returns the whole collection