interface DomainManagerInterface (View source)

Zone creation, update and deletion.

Methods

addDomain(string $domain, int|null $owner, string $type, string $slave_master, int|string $zone_template, array $groupIds = [], string|null $soaEditApi = null)

Add a domain to the database

changeZoneType(string $type, int $id)

Change Zone Type

bool
retrieveZone(int $id)

Ask the backend to retrieve a slave zone from its master now

bool
notifyZone(int $id)

Ask the backend to send NOTIFY for a primary zone now

changeZoneSlaveMaster(int $zone_id, string $ip_slave_master)

Change Slave Zone's Master IP Address

addOwnerToZone(int $zone_id, int $user_id)

Add a user as an owner of a zone; an existing owner counts as success

handOverZone(int $zone_id, int $from_user_id, int $to_user_id)

Give a zone of a user being deleted to another user; where the user's row carries the zone (API backend) it changes owner, otherwise the new owner is added

updateZoneRecords(int $dns_ttl, int $zone_id, int $zone_template_id)

Apply a zone template to a zone, or unlink it with template id 0.

Details

ZoneWriteResult addDomain(string $domain, int|null $owner, string $type, string $slave_master, int|string $zone_template, array $groupIds = [], string|null $soaEditApi = null)

Add a domain to the database

Parameters

string $domain

A domain name

int|null $owner

Owner ID for domain (null if only groups are assigned)

string $type

Type of domain ['NATIVE','MASTER','SLAVE']

string $slave_master

Master server hostname for domain

int|string $zone_template

ID of zone template ['none' or int]

array $groupIds

Group IDs for group ownership (assigned atomically within the same transaction)

string|null $soaEditApi

SOA-EDIT-API policy for the new zone; 'OFF' disables, null uses the dns.soa_edit_api config default

Return Value

ZoneWriteResult

ZoneWriteResult changeZoneType(string $type, int $id)

Change Zone Type

Parameters

string $type

New Zone Type [NATIVE,MASTER,SLAVE]

int $id

Zone ID

Return Value

ZoneWriteResult

bool retrieveZone(int $id)

Ask the backend to retrieve a slave zone from its master now

Parameters

int $id

Zone ID

Return Value

bool

true on success

bool notifyZone(int $id)

Ask the backend to send NOTIFY for a primary zone now

Parameters

int $id

Zone ID

Return Value

bool

true on success

ZoneWriteResult changeZoneSlaveMaster(int $zone_id, string $ip_slave_master)

Change Slave Zone's Master IP Address

Parameters

int $zone_id

Zone ID

string $ip_slave_master

Master IP Address

Return Value

ZoneWriteResult

ZoneWriteResult addOwnerToZone(int $zone_id, int $user_id)

Add a user as an owner of a zone; an existing owner counts as success

Parameters

int $zone_id

Zone ID

int $user_id

User ID

Return Value

ZoneWriteResult

ZoneWriteResult handOverZone(int $zone_id, int $from_user_id, int $to_user_id)

Give a zone of a user being deleted to another user; where the user's row carries the zone (API backend) it changes owner, otherwise the new owner is added

Parameters

int $zone_id
int $from_user_id
int $to_user_id

Return Value

ZoneWriteResult

ZoneWriteResult updateZoneRecords(int $dns_ttl, int $zone_id, int $zone_template_id)

Apply a zone template to a zone, or unlink it with template id 0.

Parameters

int $dns_ttl

Default TTL

int $zone_id

Zone ID to update

int $zone_template_id

Zone Template ID to use for update

Return Value

ZoneWriteResult