Documentation

Client

Table of Contents

Methods

createRecord()  : mixed
Create a single DNS record in an existing zone
createRecords()  : mixed
Delete multiple DNS records in an existing zone
deleteRecord()  : mixed
Delete a single DNS record in an existing zone
deleteRecords()  : mixed
Delete multiple DNS records in an existing zone
getDefaultZoneId()  : string
Return the default Zone ID
getSingleRecord()  : Record|null
Get a single record if it exists
getZone()  : Zone
Get a Zone by Id
getZoneRecords()  : array<string|int, Record>
Get a Zone's records by Zone Id
setDefaultZoneId()  : mixed
Set the default Zone ID
updateRecord()  : mixed
Update or create if missing a single DNS record
updateRecords()  : mixed
Update multiple DNS records in an existing zone

Methods

createRecord()

Create a single DNS record in an existing zone

public createRecord(string $zoneId, string $name, string $type, string|array<string|int, string> $value[, int $ttl = 600 ][, string $comment = '' ]) : mixed
Parameters
$zoneId : string

The Zone Id

$name : string

The DNS name of the record. No end dot.

$type : string

The DNS record type

$value : string|array<string|int, string>

The Value(s) of the DNS record

$ttl : int = 600

The TTL of the record, defaults to 600

$comment : string = ''

Set a comment for the operation

Tags
PHP8:

Refactor for named arguments and more optionals This will error on existing record. Use update for "create or update"

throws
TBD

createRecords()

Delete multiple DNS records in an existing zone

public createRecords(string $zoneId, array<string|int, Record$records[, string $comment = '' ]) : mixed
Parameters
$zoneId : string
$records : array<string|int, Record>

an array of records to delete

$comment : string = ''

deleteRecord()

Delete a single DNS record in an existing zone

public deleteRecord(string $zoneId, string $name, string $type[, string $comment = '' ]) : mixed
Parameters
$zoneId : string

The Zone Id

$name : string

The DNS name of the record. No end dot.

$type : string

The DNS record type

$comment : string = ''

Set a comment for the operation

Tags
PHP8:

Refactor for named arguments and more optionals This will check on existing record and not fail on missing.

deleteRecords()

Delete multiple DNS records in an existing zone

public deleteRecords(string $zoneId, array<string|int, Record$records[, string $comment = '' ]) : mixed
Parameters
$zoneId : string
$records : array<string|int, Record>

an array of records to delete

$comment : string = ''

getDefaultZoneId()

Return the default Zone ID

public getDefaultZoneId() : string

This is used in some methods when no zone ID argument was present

Tags
PHP8:

Refactor more methods to use this

Return values
string

The ID

getSingleRecord()

Get a single record if it exists

public getSingleRecord(string $name[, string $zoneId = '' ][, array<string|int, mixed> $filters = null ]) : Record|null
Parameters
$name : string

The DNS name of the record to retrieve. No end dot.

$zoneId : string = ''

The Zone Id (optional, falls back to default zone)

$filters : array<string|int, mixed> = null

A hash of additional filters to apply TBD, not implemented yet

Tags
PHP8:

Refactor more methods to use this

Return values
Record|null

A record representation or null if not found

getZone()

Get a Zone by Id

public getZone([string $zoneId = '' ]) : Zone

This is used in some methods when no zone ID argument was present

Parameters
$zoneId : string = ''

The ID

Tags
PHP8:

Refactor more methods to use this

Return values
Zone

A zone representation

getZoneRecords()

Get a Zone's records by Zone Id

public getZoneRecords([string $zoneId = '' ][, array<string|int, mixed> $filters = null ][, int $maxResults = 0 ]) : array<string|int, Record>
Parameters
$zoneId : string = ''

The ID (optional, falls back to default zone)

$filters : array<string|int, mixed> = null

A hash of additional filters to apply TBD, not implemented yet

$maxResults : int = 0

Maximum amount of records to get. values <= 0 mean no limit

Tags
PHP8:

Refactor more methods to use this

Return values
array<string|int, Record>

A list of record representations

setDefaultZoneId()

Set the default Zone ID

public setDefaultZoneId(string $zoneId) : mixed

This is used in some methods when no zone ID argument was present

Parameters
$zoneId : string

The ID

Tags
PHP8:

Refactor more methods to use this

updateRecord()

Update or create if missing a single DNS record

public updateRecord(string $zoneId, string $name, string $type, string|array<string|int, string> $value[, int $ttl = 600 ][, string $comment = '' ]) : mixed
Parameters
$zoneId : string

The Zone Id

$name : string

The DNS name of the record. No end dot.

$type : string

The DNS record type

$value : string|array<string|int, string>

The Value(s) of the DNS record

$ttl : int = 600

The TTL of the record, defaults to 600

$comment : string = ''

Set a comment for the operation

Tags
PHP8:

Refactor for named arguments and more optionals

If you do not want to overwrite existing records, use "create" instead

throws
TBD

updateRecords()

Update multiple DNS records in an existing zone

public updateRecords(string $zoneId, array<string|int, Record$records[, string $comment = '' ]) : mixed
Parameters
$zoneId : string
$records : array<string|int, Record>

an array of records to delete

$comment : string = ''

        
On this page

Search results