AbstractIdFetcher
in package
Abstract helper to get IDs for a sitemap from a backend (if supported).
Tags
Table of Contents
- $searchService : Service
- Search service
- __construct() : mixed
- Constructor.
- getIdsFromBackend() : array<string|int, mixed>
- Retrieve a batch of IDs. Returns an array with two possible keys: ids (the latest set of retrieved IDs) and nextOffset (an offset which can be passed to the next call to this function to retrieve the next page). When all IDs have been retrieved, the nextOffset value MUST NOT be included in the return array.
- getInitialOffset() : string
- Get the initial offset to seed the search process
- setupBackend() : void
- Set up the backend.
Properties
$searchService
Search service
protected
Service
$searchService
Methods
__construct()
Constructor.
public
__construct(Service $searchService) : mixed
Parameters
- $searchService : Service
-
Search service
Return values
mixed —getIdsFromBackend()
Retrieve a batch of IDs. Returns an array with two possible keys: ids (the latest set of retrieved IDs) and nextOffset (an offset which can be passed to the next call to this function to retrieve the next page). When all IDs have been retrieved, the nextOffset value MUST NOT be included in the return array.
public
abstract getIdsFromBackend(string $backend, string $currentOffset, int $countPerPage, array<string|int, mixed> $filters) : array<string|int, mixed>
Parameters
- $backend : string
-
Search backend ID
- $currentOffset : string
-
String representing progress through set
- $countPerPage : int
-
Page size
- $filters : array<string|int, mixed>
-
Filters to apply to the search
Return values
array<string|int, mixed> —getInitialOffset()
Get the initial offset to seed the search process
public
abstract getInitialOffset() : string
Return values
string —setupBackend()
Set up the backend.
public
abstract setupBackend(string $backend) : void
Parameters
- $backend : string
-
Search backend ID