1: <?php
2:
3: /**
4: * Models A DnsEntry
5: *
6: * @package Transip
7: * @class DnsEntry
8: * @author TransIP (support@transip.nl)
9: */
10: class Transip_DnsEntry
11: {
12: const TYPE_A = 'A';
13: const TYPE_AAAA = 'AAAA';
14: const TYPE_CNAME = 'CNAME';
15: const TYPE_MX = 'MX';
16: const TYPE_NS = 'NS';
17: const TYPE_TXT = 'TXT';
18: const TYPE_SRV = 'SRV';
19: const TYPE_SSHFP = 'SSHFP';
20: const TYPE_TLSA = 'TLSA';
21: const TYPE_CAA = 'CAA';
22: const TYPE_NAPTR = 'NAPTR';
23:
24: /**
25: * The name of the dns entry, for example '@' or 'www'
26: *
27: * @var string
28: */
29: public $name;
30:
31: /**
32: * The expiration period of the dns entry, in seconds. For example 86400 for a day
33: * of expiration
34: *
35: * @var int
36: */
37: public $expire;
38:
39: /**
40: * The type of dns entry, for example A, MX or CNAME
41: *
42: * @var string
43: */
44: public $type;
45:
46: /**
47: * The content of of the dns entry, for example '10 mail', '127.0.0.1' or 'www'
48: *
49: * @var string
50: */
51: public $content;
52:
53: /**
54: * Constructs a new DnsEntry of the form
55: * www IN 86400 A 127.0.0.1
56: * mail IN 86400 CNAME @
57: *
58: * Note that the IN class is always mandatory for this Entry and this is implied.
59: *
60: * @param string $name the name of this DnsEntry, e.g. www, mail or @
61: * @param int $expire the expiration period of the dns entry, in seconds. For example 86400 for a day
62: * @param string $type the type of this entry, one of the TYPE_ constants in this class
63: * @param string $content content of of the dns entry, for example '10 mail', '127.0.0.1' or 'www'
64: */
65: public function __construct($name, $expire, $type, $content)
66: {
67: $this->name = $name;
68: $this->expire = $expire;
69: $this->type = $type;
70: $this->content = $content;
71: }
72: }
73:
74: ?>
75: