1: <?php
2:
3: /**
4: * This class models a mailbox
5: *
6: * @package Transip
7: * @class MailBox
8: * @author TransIP (support@transip.nl)
9: */
10: class Transip_MailBox
11: {
12: const SPAMCHECKER_STRENGTH_AVERAGE = 'AVERAGE';
13: const SPAMCHECKER_STRENGTH_OFF = 'OFF';
14: const SPAMCHECKER_STRENGTH_LOW = 'LOW';
15: const SPAMCHECKER_STRENGTH_HIGH = 'HIGH';
16:
17: /**
18: * Address of this mailbox
19: *
20: * @var string
21: */
22: public $address;
23:
24: /**
25: * Mailbox spamchecker level. One of the Transip_MailBox::SPAMCHECKER_STRENGTH_* constants.
26: *
27: * @var string
28: */
29: public $spamCheckerStrength;
30:
31: /**
32: * Mailbox max size in MB
33: *
34: * @var int
35: */
36: public $maxDiskUsage;
37:
38: /**
39: * True iff the MailBox currently has a VacationReply installed
40: *
41: * @var boolean
42: */
43: public $hasVacationReply;
44:
45: /**
46: * VacationReply subject, used only when hasVacationReply is true
47: *
48: * @var string
49: */
50: public $vacationReplySubject;
51:
52: /**
53: * VacationReply message, used only when hasVacationReply is true
54: *
55: * @var string
56: */
57: public $vacationReplyMessage;
58:
59: /**
60: * Create new mailbox
61: *
62: * @param string $address the address of this MailBox
63: * @param string $spamCheckerStrength One of the Transip_MailBox::SPAMCHECKER_STRENGTH_* constants.
64: * @param int $maxDiskUsage max mailbox size in megabytes
65: * @param boolean $hasVacationReply does MailBox has vacationreply
66: * @param string $vacationReplySubject Subject of vacation reply
67: * @param string $vacationReplyMessage Message of vacation reply
68: */
69: public function __construct($address, $spamCheckerStrength = 'AVERAGE', $maxDiskUsage = 20, $hasVacationReply = false, $vacationReplySubject = '', $vacationReplyMessage = '')
70: {
71: $this->address = $address;
72: $this->spamCheckerStrength = $spamCheckerStrength;
73: $this->maxDiskUsage = $maxDiskUsage;
74: $this->hasVacationReply = $hasVacationReply;
75: $this->vacationReplySubject = $vacationReplySubject;
76: $this->vacationReplyMessage = $vacationReplyMessage;
77: }
78: }
79:
80: ?>
81: