class ZoneType (View source)

ZoneType class represents the different types of zones in a DNS system.

Constants

MASTER

SLAVE

NATIVE

CONSUMER

PRODUCER

Methods

static array
getTypes()

Get an array of the available zone types.

static bool
isReadOnly(string|null $type)

Secondary (Slave) and Consumer zones replicate their records from a primary, so Poweradmin blocks record edits for them regardless of permissions.

static bool
replicatesFromPrimary(string|null $type)

Secondary (Slave) and Consumer zones get their records by transfer from a configured primary, so they need masters set and must never be seeded locally.

static array
getCreatableTypes(bool $catalogSupported, bool $mayAddSecondary)

Kinds that may be created, given what the connected server supports and whether the caller may add a zone that replicates from a remote primary.

static array
getReplicatingTypes()

No description

static array
getAllTypes()

Every kind PowerDNS accepts. Used as a last-resort guard so an unvalidated caller cannot write an arbitrary string into the zone kind.

static bool
notifies(string|null $type)

Primary (Master) and Producer zones send DNS NOTIFY to their secondaries, so a pending-notify state is meaningful only for these; Secondary, Native, and Consumer zones never notify.

Details

static array getTypes()

Get an array of the available zone types.

Return Value

array

The array of available zone types.

static bool isReadOnly(string|null $type)

Secondary (Slave) and Consumer zones replicate their records from a primary, so Poweradmin blocks record edits for them regardless of permissions.

Parameters

string|null $type

Return Value

bool

static bool replicatesFromPrimary(string|null $type)

Secondary (Slave) and Consumer zones get their records by transfer from a configured primary, so they need masters set and must never be seeded locally.

Kept separate from isReadOnly(), which answers whether records may be edited.

Parameters

string|null $type

Return Value

bool

static array getCreatableTypes(bool $catalogSupported, bool $mayAddSecondary)

Kinds that may be created, given what the connected server supports and whether the caller may add a zone that replicates from a remote primary.

Parameters

bool $catalogSupported
bool $mayAddSecondary

Return Value

array

static array getReplicatingTypes()

No description

Return Value

array

static array getAllTypes()

Every kind PowerDNS accepts. Used as a last-resort guard so an unvalidated caller cannot write an arbitrary string into the zone kind.

Return Value

array

static bool notifies(string|null $type)

Primary (Master) and Producer zones send DNS NOTIFY to their secondaries, so a pending-notify state is meaningful only for these; Secondary, Native, and Consumer zones never notify.

Parameters

string|null $type

Return Value

bool