1 | <?php |
||
16 | class Subscription { |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | * |
||
21 | * @ORM\Column(name="full_name", type="string", length=250, options={"default":""}, nullable=false) |
||
22 | */ |
||
23 | private $fullName = ''; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | * |
||
28 | * @ORM\Column(name="email", type="string", length=250, options={"default":""}, nullable=false) |
||
29 | */ |
||
30 | private $email = ''; |
||
31 | |||
32 | /** |
||
33 | * @var \DateTime|null |
||
34 | * |
||
35 | * @ORM\Column(name="export", type="datetime", nullable=true) |
||
36 | */ |
||
37 | private $export; |
||
38 | |||
39 | /** |
||
40 | * @var \DateTime|null |
||
41 | * |
||
42 | * @ORM\Column(name="backup", type="datetime", nullable=true) |
||
43 | */ |
||
44 | private $backup; |
||
45 | |||
46 | /** |
||
47 | * @var integer |
||
48 | * |
||
49 | * @ORM\Column(name="status", type="smallint", options={"default":0}, nullable=true) |
||
50 | */ |
||
51 | private $status = 0; |
||
52 | |||
53 | /** |
||
54 | * @var string |
||
55 | * |
||
56 | * @ORM\Column(name="confirmationCode", type="string", length=32, nullable=true) |
||
57 | */ |
||
58 | private $confirmationCode; |
||
59 | |||
60 | /** |
||
61 | * @var integer |
||
62 | * |
||
63 | * @ORM\Column(name="id", type="integer") |
||
64 | * @ORM\Id |
||
65 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
66 | */ |
||
67 | private $id; |
||
68 | |||
69 | /** |
||
70 | * @ORM\ManyToOne(targetEntity="Address") |
||
71 | * @ORM\JoinColumn(name="address_id", referencedColumnName="id") |
||
72 | */ |
||
73 | private $address; |
||
74 | |||
75 | /** |
||
76 | * @var string |
||
77 | * |
||
78 | * @ORM\Column(name="tracking", type="string", length=50, nullable=true) |
||
79 | */ |
||
80 | private $tracking; |
||
81 | |||
82 | /** |
||
83 | * @var string |
||
84 | * |
||
85 | * @ORM\Column(name="source", type="string", length=50, nullable=true) |
||
86 | */ |
||
87 | private $source; |
||
88 | |||
89 | /** |
||
90 | * @var \DateTime |
||
91 | * @Gedmo\Timestampable(on="create") |
||
92 | * @ORM\Column(type="datetime") |
||
93 | */ |
||
94 | private $createdAt; |
||
95 | |||
96 | private const STATUS_NEW = 0; |
||
97 | private const STATUS_CONFIRMED = 1; |
||
98 | private const STATUS_MODERATION = 2; |
||
99 | |||
100 | public function setFullName( string $fullName ): self { |
||
105 | |||
106 | public function getFullName(): string { |
||
109 | |||
110 | public function setEmail( string $email ): self { |
||
115 | |||
116 | public function getEmail(): string { |
||
119 | |||
120 | public function setExport( \DateTime $export = null ): self { |
||
125 | |||
126 | /** |
||
127 | * @return \DateTime|null |
||
128 | */ |
||
129 | public function getExport() { |
||
132 | |||
133 | public function setBackup( \DateTime $backup = null ): self { |
||
138 | |||
139 | /** |
||
140 | * @return \DateTime|null |
||
141 | */ |
||
142 | public function getBackup() { |
||
145 | |||
146 | /** |
||
147 | * Usage of this method is discouraged, it's only for initialization with Doctrine. |
||
148 | * |
||
149 | * @see Subscription::markAsConfirmed() |
||
150 | * @see Subscription::markForModeration() |
||
151 | * @param int $status |
||
152 | * @return Subscription |
||
153 | */ |
||
154 | public function setStatus( int $status ): self { |
||
159 | |||
160 | /** |
||
161 | * Usage of this method is discouraged. Try using something like @see isUnconfirmed |
||
162 | * |
||
163 | * @return int |
||
164 | */ |
||
165 | public function getStatus(): int { |
||
168 | |||
169 | public function setConfirmationCode( string $confirmationCode ): self { |
||
174 | |||
175 | public function getConfirmationCode(): string { |
||
178 | |||
179 | public function getId(): int { |
||
182 | |||
183 | public function getAddress(): Address { |
||
186 | |||
187 | public function setAddress( Address $address ) { |
||
190 | |||
191 | public function getCreatedAt(): \DateTime { |
||
194 | |||
195 | public function setCreatedAt( \DateTime $createdAt ): self { |
||
199 | |||
200 | public function getTracking(): string { |
||
203 | |||
204 | public function setTracking( string $tracking ) { |
||
207 | |||
208 | /** |
||
209 | * @since 3.0 |
||
210 | */ |
||
211 | 1 | public function setSource( string $source ): self { |
|
216 | |||
217 | /** |
||
218 | * @since 3.0 |
||
219 | */ |
||
220 | 1 | public function getSource(): string { |
|
223 | |||
224 | /** |
||
225 | * @since 3.0 |
||
226 | */ |
||
227 | 1 | public function markAsConfirmed() { |
|
230 | |||
231 | /** |
||
232 | * @since 3.0 |
||
233 | */ |
||
234 | 2 | public function markForModeration() { |
|
237 | |||
238 | 3 | public function isUnconfirmed(): bool { |
|
241 | |||
242 | /** |
||
243 | * @since 3.0 |
||
244 | */ |
||
245 | 2 | public function needsModeration(): bool { |
|
248 | |||
249 | } |
||
250 |