class RecordIdentifier (View source)

Encoded composite record identifier for API-mode records.

In API mode, PowerDNS records have no numeric database IDs. Records are identified by their composite key (zone_name, name, type, content, prio). This class encodes/decodes that composite key as a URL-safe base64 string that can be used transparently wherever integer record IDs are used in SQL mode.

Constants

ID_PATTERN

Alphabet produced by encode(): url-safe base64 with the padding stripped.

Methods

static string
encode(string $zoneName, string $name, string $type, string $content, int $prio)

No description

static array
decode(string $encoded)

No description

static bool
isEncoded(int|string $id)

No description

Details

static string encode(string $zoneName, string $name, string $type, string $content, int $prio)

No description

Parameters

string $zoneName
string $name
string $type
string $content
int $prio

Return Value

string

static array decode(string $encoded)

No description

Parameters

string $encoded

Return Value

array

static bool isEncoded(int|string $id)

No description

Parameters

int|string $id

Return Value

bool