1: <?php
2:
3: /**
4: * This class models a ForwardHost
5: *
6: * @package Transip
7: * @class Forward
8: * @author TransIP (support@transip.nl)
9: */
10: class Transip_Forward
11: {
12: const FORWARDMETHOD_DIRECT = 'direct';
13: const FORWARDMETHOD_FRAME = 'frame';
14:
15: /**
16: * Domain name to forward
17: *
18: * @var string
19: */
20: public $domainName;
21:
22: /**
23: * URL to forward to
24: *
25: * @var string
26: */
27: public $forwardTo;
28:
29: /**
30: * Method of forwarding; either Forward::FORWARDMETHOD_DIRECT or Forward::FORWARDMETHOD_FRAME
31: *
32: * @var string
33: */
34: public $forwardMethod;
35:
36: /**
37: * Frame title if forwardMethod is set to Forward::FORWARDMETHOD_FRAME
38: *
39: * @var string
40: */
41: public $frameTitle;
42:
43: /**
44: * Frame favicon if forwardMethod is set to Forward::FORWARDMETHOD_FRAME
45: *
46: * @var string
47: */
48: public $frameIcon;
49:
50: /**
51: * Set to true to forward to preserve the URL info after the domain.
52: * For example, if set to true, http://www.sourcedomain.tld/test will
53: * be forwarded to http://www.targeturl.tld/test
54: *
55: * @var boolean
56: */
57: public $forwardEverything;
58:
59: /**
60: * Set to true if subdomains should be appended to the target URL.
61: * For example, if set to true, http://test.sourcedomain.tld/ will
62: * be forwarded to http://www.targeturl.tld/test
63: *
64: * @var boolean
65: */
66: public $forwardSubdomains;
67:
68: /**
69: * The e-mailaddress all emails to this forward are forwarded to.
70: * If empty, no e-mails are forwarded.
71: *
72: * @var string
73: */
74: public $forwardEmailTo;
75:
76: /**
77: * Constructs a Forward object.
78: *
79: * @param string $domainName Domain name to forward
80: * @param string $forwardTo URL to forward to
81: * @param string $forwardMethod OPTIONAL Method of forwarding; either Forward::FORWARDMETHOD_DIRECT or Forward::FORWARDMETHOD_FRAME
82: * @param string $frameTitle OPTIONAL Frame title if forwardMethod is set to Forward::FORWARDMETHOD_FRAME
83: * @param string $frameIcon OPTIONAL Frame favicon if forwardMethod is set to Forward::FORWARDMETHOD_FRAME
84: * @param boolean $forwardEverything OPTIONAL Set to true to forward to preserve the URL info after the domain.
85: * @param boolean $forwardSubdomains OPTIONAL Set to true if subdomains should be appended to the target URL.
86: * @param string $forwardEmailTo OPTIONAL The e-mailaddress all emails to this forward are forwarded to.
87: */
88: public function __construct($domainName, $forwardTo, $forwardMethod = 'direct', $frameTitle = '', $frameIcon = '', $forwardEverything = true, $forwardSubdomains = false, $forwardEmailTo = '')
89: {
90: $this->domainName = $domainName;
91: $this->forwardTo = $forwardTo;
92: $this->forwardMethod = $forwardMethod;
93: $this->frameTitle = $frameTitle;
94: $this->frameIcon = $frameIcon;
95: $this->forwardEverything = $forwardEverything;
96: $this->forwardSubdomains = $forwardSubdomains;
97: $this->forwardEmailTo = $forwardEmailTo;
98: }
99: }
100:
101: ?>
102: