Completed
Push — master ( 4e5a32...533976 )
by methylbro
9s
created

Email::setFolderId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
/**
4
 * This file is part of the Mediapart Selligent Client API
5
 *
6
 * CC BY-NC-SA <https://github.com/mediapart/selligent>
7
 *
8
 * For the full license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Mediapart\Selligent\Broadcast;
13
14
/**
15
 *
16
 */
17
class Email
18
{
19
    /**
20
     * @var string The name as defined for the email message properties.
21
     */
22
    private $name;
23
24
    /**
25
     * @var integer The ID of the folder in which the email is stored.
26
     */
27
    private $folderId;
28
29
    /**
30
     * @var integer The Brand used for sending out the email message.
31
     */
32
    private $mailDomainId;
33
34
    /**
35
     * @var boolean This indicates if the list unsubscribe option has been activated for the email message.
36
     */
37
    private $unsubscribe;
38
39
    /**
40
     * @var integer The queue to which the email messages are transferred for broadcast.
41
     */
42
    private $queueId;
43
44
    /**
45
     * @var string 
46
     */
47
    private $tag;
48
49
    /**
50
     * @var string The category attributed to the email message.
51
     */
52
    private $maCategory;
53
54
    /**
55
     * @var Target 
56
     */
57
    private $target;
58
59
    /**
60
     * @var array
61
     */
62
    private $content;
63
64
    /**
65
     * @param string $name The name as defined for the email message properties.
66
     * @return self
67
     */
68 1
    public function setName($name)
69
    {
70 1
        $this->name = $name;
71
72 1
        return $this;
73
    }
74
75
    /**
76
     * @return string The name as defined for the email message properties.
77
     */
78 1
    public function getName()
79
    {
80 1
        return $this->name;
81
    }
82
83
    /**
84
     * @param integer $folderId The ID of the folder in which the email is stored
85
     * @return self
86
     */
87 1
    public function setFolderId($folderId)
88
    {
89 1
        $this->folderId = $folderId;
90
91 1
        return $this;
92
    }
93
94
    /**
95
     * @return integer The ID of the folder in which the email is stored
96
     */
97 1
    public function getFolderId()
98
    {
99 1
        return $this->folderId;
100
    }
101
102
    /**
103
     * @param boolean This indicates if the list unsubscribe option has been activated for the email message.
104
     * @return self
105
     */
106 1
    public function listUnsubscribe($unsubscribe = true)
107
    {
108 1
        $this->unsubscribe = $unsubscribe;
109
110 1
        return $this;
111
    }
112
113
    /**
114
     * @return boolean Indicates if the list unsubscribe option has been activated for the email message.
115
     */
116 1
    public function canUnsubscribe()
117
    {
118 1
        return $this->unsubscribe;
119
    }
120
121
    /**
122
     * @param integer The queue to which the email messages are transferred for broadcast.
123
     * @return self
124
     */
125 1
    public function setQueueId($queueId) 
126
    {
127 1
        $this->queueId = $queueId;
128
129 1
        return $this;
130
    }
131
132
    /**
133
     * @return integer The queue to which the email messages are transferred for broadcast.
134
     */
135 1
    public function getQueueId()
136
    {
137 1
        return $this->queueId;
138
    }
139
140
    /**
141
     * @param integer The Brand used for sending out the email message.
142
     * @return self
143
     */
144 1
    public function setMailDomainId($mailDomainId)
145
    {
146 1
        $this->mailDomainId = $mailDomainId;
147
148 1
        return $this;
149
    }
150
151
    /**
152
     * @return integer The Brand used for sending out the email message.
153
     */
154 1
    public function getMailDomainId()
155
    {
156 1
        return $this->mailDomainId;
157
    }
158
159
    /**
160
     * @param string $tag
161
     * @return self
162
     */
163 1
    public function setTag($tag)
164
    {
165 1
        $this->tag = $tag;
166
167 1
        return $this;
168
    }
169
170
    /**
171
     * @return string
172
     */
173 1
    public function getTag()
174
    {
175 1
        return $this->tag;
176
    }
177
178
    /**
179
     * @param string The category attributed to the email message.
180
     * @return self
181
     */
182 1
    public function setMaCategory($maCategory)
183
    {
184 1
        $this->maCategory = $maCategory;
185
186 1
        return $this;
187
    }
188
189
    /**
190
     * @return string
191
     */
192 1
    public function getMaCategory()
193
    {
194 1
        return $this->maCategory;
195
    }
196
197
    /**
198
     * @param Target $target
199
     * @return self
200
     */
201 1
    public function setTarget($target)
202
    {
203 1
        $this->target = $target;
204
205 1
        return $this;
206
    }
207
208
    /**
209
     * @return Target
210
     */
211 1
    public function getTarget()
212
    {
213 1
        return $this->target;
214
    }
215
216
    /**
217
     *
218
     * With the folling key/values :
219
     *
220
     * - HTML: The complete HTML version of the email message
221
     * - TEXT: The complete text version of the email message
222
     * - FROM_ADDR: The From address used for the email
223
     * - FROM_NAME: The From name used in the email
224
     * - TO_ADDR: The recipients email address. This is always like following: ~Mail~
225
     * - TO_NAME: The recipient’s name. This is always like following: ~Name~
226
     * - REPLY_ADDR: The ‘reply to’ address
227
     * - REPLY_NAME: The ‘reply to’ name
228
     * - SUBJECT: The subject line of the email message
229
     *
230
     * @param Array 
231
     * @return self
232
     */
233 1
    public function setContent($content)
234
    {
235 1
        $this->content = $content;
236
237 1
        return $this;
238
    }
239
240
    /**
241
     * @return Array
242
     */
243 1
    public function getContent()
244
    {
245 1
        return $this->content;
246
    }
247
}
248