ZoneRepositoryInterface
interface ZoneRepositoryInterface (View source)
Zone reads and ownership writes over the zones and domains tables. Implemented once for direct SQL and once for the API backend mode, which reads zone state via PowerDNS.
Methods
No description
Get all zones with pagination
Get the total number of zones
Get a zone by ID
Get reverse zones with efficient database-level filtering and pagination
Get domain name by ID
Find forward zones associated with reverse zones through PTR records
Get all reverse zone counts in a single query (optimization)
Check if zone exists by ID
Get domain type by zone ID
Get slave master by zone ID
Get zone comment by zone ID
Update zone comment
Get users who own a zone
Direct owners of several zones in one query, for list pages.
Ids of every zone the user owns directly or through a group, in the id space the zone logs and zones_groups use.
Add owner to zone
Remove owner from zone
Get zone ID by name
Get raw PowerDNS domain metadata rows for a zone.
Replace all PowerDNS domain metadata rows for a zone.
Update zone metadata
Delete a zone by ID
Get a zone by ID with full details
Check if user is already an owner of the zone
List zones with optional user/permission filtering
Check if a zone exists, optionally for a specific user
Get a zone by name
Get count of zones with filtering
Get all zones with filtering and pagination
Details
array
getDistinctStartingLetters(int $userId, bool $viewOthers)
No description
array
getAllZones(int|null $offset = null, int|null $limit = null)
Get all zones with pagination
int
getZoneCount()
Get the total number of zones
array|null
getZoneById(int $zoneId)
Get a zone by ID
array|int
getReverseZones(string $permType, int $userId, string $reverseType = 'all', int $offset = 0, int $limit = 25, string $sortBy = 'name', string $sortDirection = 'ASC', bool $countOnly = false, bool $showSerial = false, bool $showTemplate = false, bool $includeHealth = true, bool $includeRecordCount = true)
Get reverse zones with efficient database-level filtering and pagination
string|null
getDomainNameById(int $zoneId)
Get domain name by ID
array
findForwardZonesByPtrRecords(array $reverseZoneIds)
Find forward zones associated with reverse zones through PTR records
array
getReverseZoneCounts(string $permType, int $userId)
Get all reverse zone counts in a single query (optimization)
bool
zoneIdExists(int $zoneId)
Check if zone exists by ID
string
getDomainType(int $zoneId)
Get domain type by zone ID
string|null
getDomainSlaveMaster(int $zoneId)
Get slave master by zone ID
string|null
getZoneComment(int $zoneId)
Get zone comment by zone ID
bool
updateZoneComment(int $zoneId, string $comment)
Update zone comment
array
getZoneOwners(int $zoneId)
Get users who own a zone
array
getOwnerIdsByZoneIds(array $zoneIds)
Direct owners of several zones in one query, for list pages.
array
getOwnedZoneIds(int $userId)
Ids of every zone the user owns directly or through a group, in the id space the zone logs and zones_groups use.
bool
addOwnerToZone(int $zoneId, int $userId)
Add owner to zone
bool
removeOwnerFromZone(int $zoneId, int $userId)
Remove owner from zone
int|null
getZoneIdByName(string $zoneName)
Get zone ID by name
array
getDomainMetadata(int $zoneId)
Get raw PowerDNS domain metadata rows for a zone.
bool
replaceDomainMetadata(int $zoneId, array $metadata)
Replace all PowerDNS domain metadata rows for a zone.
bool
updateZone(int $zoneId, array $updates)
Update zone metadata
bool
deleteZone(int $zoneId)
Delete a zone by ID
array|null
getZone(int $zoneId)
Get a zone by ID with full details
bool
isUserZoneOwner(int $zoneId, int $userId)
Check if user is already an owner of the zone
array
listZones(int|null $userId = null, bool $viewOthers = false, array $filters = [], int $offset = 0, int $limit = 100)
List zones with optional user/permission filtering
bool
zoneExists(int $zoneId, int|null $userId = null)
Check if a zone exists, optionally for a specific user
array|null
getZoneByName(string $zoneName)
Get a zone by name
int
getZoneCountFiltered(array|null $zoneIds, int|null $userId = null, string|null $nameFilter = null)
Get count of zones with filtering
array
getAllZonesFiltered(array|null $zoneIds, int|null $userId = null, string|null $nameFilter = null, int|null $offset = null, int|null $limit = null)
Get all zones with filtering and pagination