abstract class ApiSearchBase (View source)

Shared parts of the API-mode searches: query preprocessing that mirrors BaseSearch, and the ownership lookups against Poweradmin's own zones table.

Methods

__construct(PDO $db, DnsBackendProviderInterface $backendProvider, ZoneRepositoryInterface $zoneRepository)

No description

array
preprocessSearchQuery(array $parameters)

Punycode normalization and reverse IP expansion, matching what BaseSearch::buildSearchString() does for the SQL search.

array
ownedZoneIds(int $userId)

No description

array
keepOpenedZones(array $items, string $idKey, string $nameKey)

Drop the results of a zone whose canonical id another zone shares and opens (see SharedZoneIds).

string
canonicalZoneId(string $alias)

No description

Details

__construct(PDO $db, DnsBackendProviderInterface $backendProvider, ZoneRepositoryInterface $zoneRepository)

No description

Parameters

PDO $db
DnsBackendProviderInterface $backendProvider
ZoneRepositoryInterface $zoneRepository

protected array preprocessSearchQuery(array $parameters)

Punycode normalization and reverse IP expansion, matching what BaseSearch::buildSearchString() does for the SQL search.

Parameters

array $parameters

Return Value

array

protected array ownedZoneIds(int $userId)

No description

Parameters

int $userId

Return Value

array

protected array keepOpenedZones(array $items, string $idKey, string $nameKey)

Drop the results of a zone whose canonical id another zone shares and opens (see SharedZoneIds).

Parameters

array $items
string $idKey
string $nameKey

Return Value

array

protected string canonicalZoneId(string $alias)

No description

Parameters

string $alias

Return Value

string