interface ZoneWriteBackendInterface (View source)

Zone create, delete, kind, primary, account and AXFR-retrieve writes against the DNS backend.

Methods

int|false
createZone(string $domain, string $type, string $slaveMaster = '')

Create a new zone in the DNS backend.

bool
deleteZone(int $domainId, string $zoneName)

Delete a zone and all its associated DNS data (records, metadata, cryptokeys).

bool
updateZoneType(int $domainId, string $type)

Change zone type (NATIVE, MASTER, SLAVE, PRODUCER, CONSUMER).

bool
updateZoneMaster(int $domainId, string $masterIp)

Update slave zone's master IP address.

bool
retrieveZone(int $domainId)

Request an immediate AXFR transfer of a secondary (slave) zone from its master.

bool
notifyZone(int $domainId)

Queue a NOTIFY to the secondaries of a primary zone.

bool
updateZoneAccount(int $domainId, string $account)

Update zone account field.

Details

int|false createZone(string $domain, string $type, string $slaveMaster = '')

Create a new zone in the DNS backend.

Parameters

string $domain

Zone name (without trailing dot)

string $type

Zone type: NATIVE, MASTER, SLAVE, PRODUCER, or CONSUMER

string $slaveMaster

Master IP for kinds that replicate from a primary (SLAVE, CONSUMER)

Return Value

int|false

The new domain ID, or false on failure

bool deleteZone(int $domainId, string $zoneName)

Delete a zone and all its associated DNS data (records, metadata, cryptokeys).

Does NOT delete Poweradmin-internal data (zones table, records_zone_templ, etc.)

  • those are handled by the caller.

Parameters

int $domainId

Domain ID

string $zoneName

Zone name (needed for API calls)

Return Value

bool

bool updateZoneType(int $domainId, string $type)

Change zone type (NATIVE, MASTER, SLAVE, PRODUCER, CONSUMER).

Masters are cleared unless the new kind replicates from a primary.

Parameters

int $domainId

Domain ID

string $type

New zone type

Return Value

bool

bool updateZoneMaster(int $domainId, string $masterIp)

Update slave zone's master IP address.

Parameters

int $domainId

Domain ID

string $masterIp

Master IP address

Return Value

bool

bool retrieveZone(int $domainId)

Request an immediate AXFR transfer of a secondary (slave) zone from its master.

Needs a configured PowerDNS API. Without one the SQL backend returns false, since PowerDNS then pulls secondaries on its own refresh schedule.

Parameters

int $domainId

Domain ID

Return Value

bool

bool notifyZone(int $domainId)

Queue a NOTIFY to the secondaries of a primary zone.

Needs a configured PowerDNS API; without one the SQL backend returns false.

Parameters

int $domainId

Domain ID

Return Value

bool

bool updateZoneAccount(int $domainId, string $account)

Update zone account field.

Parameters

int $domainId

Domain ID

string $account

Account value

Return Value

bool