ApiZoneRepository
class ApiZoneRepository implements ZoneRepositoryInterface (View source)
Constants
| private METADATA_NOT_SUPPORTED |
|
Methods
No description
No description
Get reverse zones with efficient database-level filtering and pagination
Get all reverse zone counts in a single query (optimization)
Get domain name by ID
List zones with optional user/permission filtering
Check if a zone exists, optionally for a specific user
Get a zone by ID with full details
Get a zone by name
Find forward zones associated with reverse zones through PTR records
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
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.
Get users who own a zone
Add owner to zone
Remove owner from zone
Check if user is already an owner of the zone
Get zone ID by name
Delete a zone by ID
Update zone metadata
Get all zones with pagination
Get the total number of zones
Get count of zones with filtering
Get all zones with filtering and pagination
Get a zone by ID
No description
No description
Details
__construct(PDO $db, DnsBackendProvider $backendProvider, string $dbType, ConfigurationInterface $config)
No description
array
getDistinctStartingLetters(int $userId, bool $viewOthers)
No description
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
array
getReverseZoneCounts(string $permType, int $userId)
Get all reverse zone counts in a single query (optimization)
string|null
getDomainNameById(int $zoneId)
Get domain name by ID
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
getZone(int $zoneId)
Get a zone by ID with full details
array|null
getZoneByName(string $zoneName)
Get a zone by name
array
findForwardZonesByPtrRecords(array $reverseZoneIds)
Find forward zones associated with reverse zones through PTR records
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
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.
array
getZoneOwners(int $zoneId)
Get users who own a zone
bool
addOwnerToZone(int $zoneId, int $userId)
Add owner to zone
bool
removeOwnerFromZone(int $zoneId, int $userId)
Remove owner from zone
bool
isUserZoneOwner(int $zoneId, int $userId)
Check if user is already an owner of the zone
int|null
getZoneIdByName(string $zoneName)
Get zone ID by name
bool
deleteZone(int $zoneId)
Delete a zone by ID
bool
updateZone(int $zoneId, array $updates)
Update zone metadata
array
getAllZones(int|null $offset = null, int|null $limit = null)
Get all zones with pagination
int
getZoneCount()
Get the total number of zones
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
array|null
getZoneById(int $zoneId)
Get a zone by ID
array
getDomainMetadata(int $zoneId)
No description
bool
replaceDomainMetadata(int $zoneId, array $metadata)
No description