DNSService
extends VultrService
in package
DNS service handler, for dns endpoints.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- createDomain() : void
- Create a DNS domain. If no ip address is supplied a domain with no records will be created.
- createRecord() : Record
- Create a DNS record for the domain name.
- deleteDomain() : void
- Delete the domain and all of its records.
- deleteRecord() : void
- Delete a DNS record for a given domain name.
- getDNSSecInfo() : array<string|int, mixed>
- Get DNSSEC information for the domain name.
- getDomain() : Domain
- Get a specific domain on the account.
- getDomains() : array<string|int, Domain>
- List DNS domains on the account.
- getRecord() : array<string|int, mixed>
- Get a specific DNS record for a given domain name.
- getRecords() : array<string|int, mixed>
- Get DNS records for a given domain name.
- getSOAInfo() : DNSSOA
- Get SOA(start of authority) information for the domain name.
- updateDomain() : void
- Update the domain to enabled/disable other options.
- updateRecord() : void
- Update the DNS record for the domain name.
- updateSOAInfo() : void
- Update the SOA information on the domain name. All attributes are optional.
- createObject() : ModelInterface
- deleteObject() : void
- getClientHandler() : VultrClientHandler
- getListObjects() : array<string|int, ModelInterface>
- getObject() : ModelInterface
- getVultrClient() : VultrClient
- list() : array<string|int, mixed>
- patchObject() : void
- getReadableClassType() : string
Properties
$vultr
protected
VultrClient
$vultr
$client
private
VultrClientHandler
$client
Methods
__construct()
public
__construct(VultrClient $vultr, VultrClientHandler $client) : mixed
Parameters
- $vultr : VultrClient
- $client : VultrClientHandler
createDomain()
Create a DNS domain. If no ip address is supplied a domain with no records will be created.
public
createDomain( $domain[, $dns_sec = 'disabled' ][, $ip = '' ]) : void
Parameters
Tags
createRecord()
Create a DNS record for the domain name.
public
createRecord( $domain, $record) : Record
Parameters
Tags
Return values
RecorddeleteDomain()
Delete the domain and all of its records.
public
deleteDomain( $domain) : void
Parameters
Tags
deleteRecord()
Delete a DNS record for a given domain name.
public
deleteRecord( $domain, $record_id) : void
Parameters
- $domain :
-
- string - Example: example.com
- $record_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
Tags
getDNSSecInfo()
Get DNSSEC information for the domain name.
public
getDNSSecInfo( $domain) : array<string|int, mixed>
Parameters
Tags
Return values
array<string|int, mixed>getDomain()
Get a specific domain on the account.
public
getDomain( $domain) : Domain
Parameters
Tags
Return values
DomaingetDomains()
List DNS domains on the account.
public
getDomains([ &$options = null ]) : array<string|int, Domain>
Parameters
Tags
Return values
array<string|int, Domain>getRecord()
Get a specific DNS record for a given domain name.
public
getRecord( $domain, $record_id) : array<string|int, mixed>
Parameters
- $domain :
-
- string - Example: example.com
- $record_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
Tags
Return values
array<string|int, mixed>getRecords()
Get DNS records for a given domain name.
public
getRecords( $domain[, &$options = null ]) : array<string|int, mixed>
Parameters
- $domain :
-
- string - Example: example.com
- $options : = null
-
- ListOptions|null - Interact via reference.
Tags
Return values
array<string|int, mixed>getSOAInfo()
Get SOA(start of authority) information for the domain name.
public
getSOAInfo( $domain) : DNSSOA
Parameters
Tags
Return values
DNSSOAupdateDomain()
Update the domain to enabled/disable other options.
public
updateDomain(Domain $domain) : void
Parameters
- $domain : Domain
Tags
updateRecord()
Update the DNS record for the domain name.
public
updateRecord( $domain, $record) : void
Parameters
Tags
updateSOAInfo()
Update the SOA information on the domain name. All attributes are optional.
public
updateSOAInfo( $domain, $soa) : void
Parameters
Tags
createObject()
protected
createObject( $uri, $model, $params) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are creating
- $params :
-
- array - The values that we will be sending. Refactor to use getUpdateParams/getUpdateArray?
Tags
Return values
ModelInterfacedeleteObject()
protected
deleteObject( $uri, $model) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are acting on deleting. This doesn't need to be a fully initialized object.
Tags
getClientHandler()
protected
getClientHandler() : VultrClientHandler
Return values
VultrClientHandlergetListObjects()
protected
getListObjects( $uri, $model[, &$options = null ][, $params = null ]) : array<string|int, ModelInterface>
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
- $options : = null
-
- ListOptions - Pagination object
- $params : = null
-
- array - filter parameters.
Tags
Return values
array<string|int, ModelInterface>getObject()
protected
getObject( $uri, $model) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
Tags
Return values
ModelInterfacegetVultrClient()
protected
getVultrClient() : VultrClient
Return values
VultrClientlist()
protected
list(string $uri, ModelInterface $model, ListOptions &$options[, array<string|int, mixed>|null $params = null ]) : array<string|int, mixed>
Parameters
- $uri : string
- $model : ModelInterface
- $options : ListOptions
- $params : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>patchObject()
protected
patchObject( $uri, $model[, array<string|int, mixed>|null $params = null ]) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are updating. This needs to be a fully initialized object.
- $params : array<string|int, mixed>|null = null
Tags
getReadableClassType()
private
getReadableClassType(ModelInterface $model) : string
Parameters
- $model : ModelInterface