Completed
Push — queries ( 816141...e1f79b )
by Kamil
49:08 queued 26:57
created

Email::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
eloc 2
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Component\Mailer\Model;
13
14
/**
15
 * @author Paweł Jędrzejewski <[email protected]>
16
 */
17
class Email implements EmailInterface
18
{
19
    /**
20
     * @var mixed
21
     */
22
    protected $id;
23
24
    /**
25
     * @var string
26
     */
27
    protected $code;
28
29
    /**
30
     * @var bool
31
     */
32
    protected $enabled = true;
33
34
    /**
35
     * @var string
36
     */
37
    protected $subject;
38
39
    /**
40
     * @var string
41
     */
42
    protected $content;
43
44
    /**
45
     * @var string
46
     */
47
    protected $template;
48
49
    /**
50
     * @var string
51
     */
52
    protected $senderName;
53
54
    /**
55
     * @var string
56
     */
57
    protected $senderAddress;
58
59
    /**
60
     * {@inheritdoc}
61
     */
62
    public function getId()
63
    {
64
        return $this->id;
65
    }
66
67
    /**
68
     * {@inheritdoc}
69
     */
70
    public function getCode()
71
    {
72
        return $this->code;
73
    }
74
75
    /**
76
     * {@inheritdoc}
77
     */
78
    public function setCode($code)
79
    {
80
        $this->code = $code;
81
    }
82
83
    /**
84
     * {@inheritdoc}
85
     */
86
    public function isEnabled()
87
    {
88
        return $this->enabled;
89
    }
90
91
    /**
92
     * @param bool $enabled
93
     */
94
    public function setEnabled($enabled)
95
    {
96
        $this->enabled = (bool) $enabled;
97
    }
98
99
    public function enable()
100
    {
101
        $this->enabled = true;
102
    }
103
104
    public function disable()
105
    {
106
        $this->enabled = false;
107
    }
108
109
    /**
110
     * {@inheritdoc}
111
     */
112
    public function getSubject()
113
    {
114
        return $this->subject;
115
    }
116
117
    /**
118
     * {@inheritdoc}
119
     */
120
    public function setSubject($subject)
121
    {
122
        $this->subject = $subject;
123
    }
124
125
    /**
126
     * {@inheritdoc}
127
     */
128
    public function getContent()
129
    {
130
        return $this->content;
131
    }
132
133
    /**
134
     * {@inheritdoc}
135
     */
136
    public function setContent($content)
137
    {
138
        $this->content = $content;
139
    }
140
141
    /**
142
     * {@inheritdoc}
143
     */
144
    public function getTemplate()
145
    {
146
        return $this->template;
147
    }
148
149
    /**
150
     * {@inheritdoc}
151
     */
152
    public function setTemplate($template)
153
    {
154
        $this->template = $template;
155
    }
156
157
    /**
158
     * {@inheritdoc}
159
     */
160
    public function getSenderName()
161
    {
162
        return $this->senderName;
163
    }
164
165
    /**
166
     * {@inheritdoc}
167
     */
168
    public function setSenderName($senderName)
169
    {
170
        $this->senderName = $senderName;
171
    }
172
173
    /**
174
     * {@inheritdoc}
175
     */
176
    public function getSenderAddress()
177
    {
178
        return $this->senderAddress;
179
    }
180
181
    /**
182
     * {@inheritdoc}
183
     */
184
    public function setSenderAddress($senderAddress)
185
    {
186
        $this->senderAddress = $senderAddress;
187
    }
188
}
189