public
|
__construct(
?int $pageSize = null,
(Closure(mixed): list<mixed>)|array-key|null $entitySelector = null,
string $pageSizeKey = 'per_page',
)
Creates a new LinkPager object
Creates a new LinkPager object
Parameters
$entitySelector |
Entities
are returned from:
-
$entitySelector($data) if $entitySelector is a closure
-
Arr::get($data, $entitySelector) if $entitySelector is a string or
integer, or
-
$data if $entitySelector is null
|
|
#
|
public
|
getPage(
$data,
RequestInterface $request,
HttpResponseInterface $response,
CurlerInterface $curler,
?CurlerPageInterface $previousPage = null,
?array $query = null,
): CurlerPageInterface
Convert data returned by the endpoint to a new page object
Convert data returned by the endpoint to a new page object
Parameters
$query |
The query applied to $request or returned by
{@see CurlerPageRequestInterface::getNextQuery()}, if applicable.
|
Implements
|
#
|