1 | <?php |
||
19 | class DomainRecord extends AbstractApi |
||
20 | { |
||
21 | /** |
||
22 | * List all the records associated with a particular domain. |
||
23 | * |
||
24 | * @param string $domain Domain to list records for |
||
25 | * |
||
26 | * @return DomainRecordEntity |
||
27 | */ |
||
28 | public function list($domain) |
||
34 | |||
35 | /** |
||
36 | * Add a DNS record. |
||
37 | * |
||
38 | * @param string $domain Domain name to add record to |
||
39 | * @param string $type Type (A, AAAA, MX, etc) of record |
||
40 | * @param string $name Name (subdomain) of record |
||
41 | * @param string $data Data for this record |
||
42 | * @param int $priority (only required for MX and SRV) Priority of this record (omit the priority from the data) |
||
43 | * @param int $ttl TTL of this record |
||
44 | * |
||
45 | * @throws HttpException|InvalidRecordException |
||
46 | */ |
||
47 | public function create($domain, $type, $name, $data, $priority = null, $ttl = null) |
||
76 | |||
77 | /** |
||
78 | * @param string $domain Domain name to update record |
||
79 | * @param int $recordId ID of record to update |
||
80 | * @param string|null $name Name (subdomain) of record |
||
81 | * @param string|null $data Data for this record |
||
82 | * @param int|null $priority Priority of this record |
||
83 | * @param int|null $ttl TTL of this record |
||
84 | * |
||
85 | * @throws HttpException |
||
86 | * |
||
87 | * @return DomainRecordEntity |
||
88 | */ |
||
89 | public function update($domain, $recordId, $name = null, $data = null, $priority = null, $ttl = null) |
||
99 | |||
100 | /** |
||
101 | * Delete an individual DNS record. |
||
102 | * |
||
103 | * @param string $domain Domain name to delete record from |
||
104 | * @param int $recordId ID of record to delete |
||
105 | * |
||
106 | * @throws HttpException |
||
107 | */ |
||
108 | public function delete($domain, $recordId) |
||
116 | } |
||
117 |