]>
Commit | Line | Data |
---|---|---|
9d50517c NL |
1 | <?php |
2 | ||
ad4d1caa | 3 | namespace Wallabag\CoreBundle\Entity; |
9d50517c | 4 | |
0a018fe0 | 5 | use Doctrine\Common\Collections\ArrayCollection; |
9d50517c | 6 | use Doctrine\ORM\Mapping as ORM; |
0f006880 | 7 | use Hateoas\Configuration\Annotation as Hateoas; |
268e9e72 | 8 | use JMS\Serializer\Annotation\Groups; |
0f006880 | 9 | use JMS\Serializer\Annotation\XmlRoot; |
7d1fdab2 TC |
10 | use JMS\Serializer\Annotation\Exclude; |
11 | use JMS\Serializer\Annotation\VirtualProperty; | |
12 | use JMS\Serializer\Annotation\SerializedName; | |
619cc453 | 13 | use Symfony\Component\Validator\Constraints as Assert; |
1210dae1 | 14 | use Wallabag\UserBundle\Entity\User; |
4dc87223 | 15 | use Wallabag\AnnotationBundle\Entity\Annotation; |
9d50517c NL |
16 | |
17 | /** | |
4346a860 | 18 | * Entry. |
9d50517c | 19 | * |
0f006880 | 20 | * @XmlRoot("entry") |
be463487 | 21 | * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntryRepository") |
7e9c1d65 JB |
22 | * @ORM\Table( |
23 | * name="`entry`", | |
24 | * options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"}, | |
81375151 NL |
25 | * indexes={ |
26 | * @ORM\Index(name="created_at", columns={"created_at"}), | |
7239082a | 27 | * @ORM\Index(name="uid", columns={"uid"}) |
81375151 | 28 | * } |
7e9c1d65 | 29 | * ) |
34d15eb4 | 30 | * @ORM\HasLifecycleCallbacks() |
0f006880 | 31 | * @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())") |
9d50517c | 32 | */ |
be463487 | 33 | class Entry |
9d50517c | 34 | { |
0f006880 | 35 | /** @Serializer\XmlAttribute */ |
9d50517c | 36 | /** |
4346a860 | 37 | * @var int |
9d50517c | 38 | * |
be463487 | 39 | * @ORM\Column(name="id", type="integer") |
9d50517c | 40 | * @ORM\Id |
34d15eb4 | 41 | * @ORM\GeneratedValue(strategy="AUTO") |
5b7da076 TC |
42 | * |
43 | * @Groups({"entries_for_user", "export_all"}) | |
9d50517c | 44 | */ |
be463487 | 45 | private $id; |
9d50517c | 46 | |
f3d0cb91 | 47 | /** |
78b3c31d | 48 | * @var string |
f3d0cb91 | 49 | * |
7239082a | 50 | * @ORM\Column(name="uid", type="string", length=23, nullable=true) |
f3d0cb91 NL |
51 | * |
52 | * @Groups({"entries_for_user", "export_all"}) | |
53 | */ | |
7239082a | 54 | private $uid; |
f3d0cb91 | 55 | |
9d50517c NL |
56 | /** |
57 | * @var string | |
58 | * | |
59 | * @ORM\Column(name="title", type="text", nullable=true) | |
5b7da076 TC |
60 | * |
61 | * @Groups({"entries_for_user", "export_all"}) | |
9d50517c NL |
62 | */ |
63 | private $title; | |
64 | ||
65 | /** | |
66 | * @var string | |
67 | * | |
b84a8055 | 68 | * @Assert\NotBlank() |
9d50517c | 69 | * @ORM\Column(name="url", type="text", nullable=true) |
5b7da076 TC |
70 | * |
71 | * @Groups({"entries_for_user", "export_all"}) | |
9d50517c NL |
72 | */ |
73 | private $url; | |
74 | ||
75 | /** | |
4346a860 | 76 | * @var bool |
9d50517c | 77 | * |
189ef634 TC |
78 | * @Exclude |
79 | * | |
be463487 | 80 | * @ORM\Column(name="is_archived", type="boolean") |
5b7da076 TC |
81 | * |
82 | * @Groups({"entries_for_user", "export_all"}) | |
9d50517c | 83 | */ |
905ae369 | 84 | private $isArchived = false; |
9d50517c NL |
85 | |
86 | /** | |
4346a860 | 87 | * @var bool |
9d50517c | 88 | * |
189ef634 TC |
89 | * @Exclude |
90 | * | |
be463487 | 91 | * @ORM\Column(name="is_starred", type="boolean") |
5b7da076 TC |
92 | * |
93 | * @Groups({"entries_for_user", "export_all"}) | |
9d50517c | 94 | */ |
905ae369 | 95 | private $isStarred = false; |
9d50517c | 96 | |
9d50517c NL |
97 | /** |
98 | * @var string | |
99 | * | |
eacaf7f8 | 100 | * @ORM\Column(name="content", type="text", nullable=true) |
5b7da076 TC |
101 | * |
102 | * @Groups({"entries_for_user", "export_all"}) | |
9d50517c | 103 | */ |
eacaf7f8 | 104 | private $content; |
9d50517c | 105 | |
34d15eb4 | 106 | /** |
8664069e | 107 | * @var \DateTime |
34d15eb4 | 108 | * |
be463487 | 109 | * @ORM\Column(name="created_at", type="datetime") |
5b7da076 | 110 | * |
9401696f | 111 | * @Groups({"entries_for_user", "export_all"}) |
34d15eb4 NL |
112 | */ |
113 | private $createdAt; | |
114 | ||
115 | /** | |
8664069e | 116 | * @var \DateTime |
34d15eb4 | 117 | * |
be463487 | 118 | * @ORM\Column(name="updated_at", type="datetime") |
5b7da076 | 119 | * |
9401696f | 120 | * @Groups({"entries_for_user", "export_all"}) |
34d15eb4 NL |
121 | */ |
122 | private $updatedAt; | |
123 | ||
5e9009ce NL |
124 | /** |
125 | * @var \DateTime | |
126 | * | |
127 | * @ORM\Column(name="published_at", type="datetime", nullable=true) | |
128 | * | |
129 | * @Groups({"entries_for_user", "export_all"}) | |
130 | */ | |
131 | private $publishedAt; | |
132 | ||
7b0b3622 NL |
133 | /** |
134 | * @var array | |
135 | * | |
136 | * @ORM\Column(name="published_by", type="json_array", nullable=true) | |
137 | * | |
138 | * @Groups({"entries_for_user", "export_all"}) | |
139 | */ | |
140 | private $publishedBy; | |
141 | ||
34d15eb4 | 142 | /** |
4dc87223 | 143 | * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) |
f38e03dc | 144 | * @ORM\JoinTable |
5b7da076 | 145 | * |
f38e03dc | 146 | * @Groups({"entries_for_user", "export_all"}) |
34d15eb4 | 147 | */ |
4dc87223 | 148 | private $annotations; |
34d15eb4 NL |
149 | |
150 | /** | |
151 | * @var string | |
152 | * | |
153 | * @ORM\Column(name="mimetype", type="text", nullable=true) | |
5b7da076 TC |
154 | * |
155 | * @Groups({"entries_for_user", "export_all"}) | |
34d15eb4 NL |
156 | */ |
157 | private $mimetype; | |
158 | ||
98f0929f JB |
159 | /** |
160 | * @var string | |
161 | * | |
162 | * @ORM\Column(name="language", type="text", nullable=true) | |
5b7da076 TC |
163 | * |
164 | * @Groups({"entries_for_user", "export_all"}) | |
98f0929f JB |
165 | */ |
166 | private $language; | |
167 | ||
34d15eb4 | 168 | /** |
4346a860 | 169 | * @var int |
34d15eb4 | 170 | * |
26864574 | 171 | * @ORM\Column(name="reading_time", type="integer", nullable=true) |
5b7da076 TC |
172 | * |
173 | * @Groups({"entries_for_user", "export_all"}) | |
34d15eb4 NL |
174 | */ |
175 | private $readingTime; | |
176 | ||
177 | /** | |
178 | * @var string | |
179 | * | |
180 | * @ORM\Column(name="domain_name", type="text", nullable=true) | |
5b7da076 TC |
181 | * |
182 | * @Groups({"entries_for_user", "export_all"}) | |
34d15eb4 NL |
183 | */ |
184 | private $domainName; | |
185 | ||
fad31615 JB |
186 | /** |
187 | * @var string | |
188 | * | |
189 | * @ORM\Column(name="preview_picture", type="text", nullable=true) | |
5b7da076 TC |
190 | * |
191 | * @Groups({"entries_for_user", "export_all"}) | |
fad31615 JB |
192 | */ |
193 | private $previewPicture; | |
194 | ||
10b35097 | 195 | /** |
e10e6ab3 | 196 | * @var string |
10b35097 | 197 | * |
3ef75cc4 | 198 | * @ORM\Column(name="http_status", type="string", length=3, nullable=true) |
10b35097 NL |
199 | * |
200 | * @Groups({"entries_for_user", "export_all"}) | |
201 | */ | |
202 | private $httpStatus; | |
203 | ||
5f09650e | 204 | /** |
7d1fdab2 TC |
205 | * @Exclude |
206 | * | |
1210dae1 | 207 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="entries") |
5b7da076 TC |
208 | * |
209 | * @Groups({"export_all"}) | |
5f09650e NL |
210 | */ |
211 | private $user; | |
212 | ||
0a018fe0 | 213 | /** |
af95c09c | 214 | * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist"}) |
e42b13bc JB |
215 | * @ORM\JoinTable( |
216 | * name="entry_tag", | |
217 | * joinColumns={ | |
206bade5 | 218 | * @ORM\JoinColumn(name="entry_id", referencedColumnName="id", onDelete="cascade") |
e42b13bc JB |
219 | * }, |
220 | * inverseJoinColumns={ | |
206bade5 | 221 | * @ORM\JoinColumn(name="tag_id", referencedColumnName="id", onDelete="cascade") |
e42b13bc JB |
222 | * } |
223 | * ) | |
0a018fe0 NL |
224 | */ |
225 | private $tags; | |
226 | ||
5f09650e NL |
227 | /* |
228 | * @param User $user | |
229 | */ | |
5d6f6f56 | 230 | public function __construct(User $user) |
5f09650e NL |
231 | { |
232 | $this->user = $user; | |
0a018fe0 | 233 | $this->tags = new ArrayCollection(); |
5f09650e NL |
234 | } |
235 | ||
9d50517c | 236 | /** |
4346a860 | 237 | * Get id. |
9d50517c | 238 | * |
4346a860 | 239 | * @return int |
9d50517c NL |
240 | */ |
241 | public function getId() | |
242 | { | |
243 | return $this->id; | |
244 | } | |
245 | ||
246 | /** | |
4346a860 JB |
247 | * Set title. |
248 | * | |
249 | * @param string $title | |
9d50517c | 250 | * |
be463487 | 251 | * @return Entry |
9d50517c NL |
252 | */ |
253 | public function setTitle($title) | |
254 | { | |
255 | $this->title = $title; | |
256 | ||
257 | return $this; | |
258 | } | |
259 | ||
260 | /** | |
4346a860 | 261 | * Get title. |
9d50517c | 262 | * |
7df80cb3 | 263 | * @return string |
9d50517c NL |
264 | */ |
265 | public function getTitle() | |
266 | { | |
267 | return $this->title; | |
268 | } | |
269 | ||
270 | /** | |
4346a860 JB |
271 | * Set url. |
272 | * | |
273 | * @param string $url | |
9d50517c | 274 | * |
be463487 | 275 | * @return Entry |
9d50517c NL |
276 | */ |
277 | public function setUrl($url) | |
278 | { | |
279 | $this->url = $url; | |
280 | ||
281 | return $this; | |
282 | } | |
283 | ||
284 | /** | |
4346a860 | 285 | * Get url. |
9d50517c | 286 | * |
7df80cb3 | 287 | * @return string |
9d50517c NL |
288 | */ |
289 | public function getUrl() | |
290 | { | |
291 | return $this->url; | |
292 | } | |
293 | ||
294 | /** | |
4346a860 JB |
295 | * Set isArchived. |
296 | * | |
8eedc8cf | 297 | * @param bool $isArchived |
9d50517c | 298 | * |
be463487 | 299 | * @return Entry |
9d50517c | 300 | */ |
905ae369 | 301 | public function setArchived($isArchived) |
9d50517c | 302 | { |
905ae369 | 303 | $this->isArchived = $isArchived; |
9d50517c NL |
304 | |
305 | return $this; | |
306 | } | |
307 | ||
308 | /** | |
4346a860 | 309 | * Get isArchived. |
9d50517c | 310 | * |
8eedc8cf | 311 | * @return bool |
9d50517c | 312 | */ |
905ae369 | 313 | public function isArchived() |
9d50517c | 314 | { |
905ae369 | 315 | return $this->isArchived; |
9d50517c NL |
316 | } |
317 | ||
189ef634 TC |
318 | /** |
319 | * @VirtualProperty | |
320 | * @SerializedName("is_archived") | |
321 | * @Groups({"entries_for_user", "export_all"}) | |
322 | */ | |
323 | public function is_Archived() | |
324 | { | |
325 | return (int) $this->isArchived(); | |
326 | } | |
327 | ||
163eae0b NL |
328 | public function toggleArchive() |
329 | { | |
905ae369 | 330 | $this->isArchived = $this->isArchived() ^ 1; |
7df80cb3 | 331 | |
163eae0b NL |
332 | return $this; |
333 | } | |
334 | ||
9d50517c | 335 | /** |
4346a860 JB |
336 | * Set isStarred. |
337 | * | |
8eedc8cf | 338 | * @param bool $isStarred |
9d50517c | 339 | * |
be463487 | 340 | * @return Entry |
9d50517c | 341 | */ |
905ae369 | 342 | public function setStarred($isStarred) |
9d50517c | 343 | { |
905ae369 | 344 | $this->isStarred = $isStarred; |
9d50517c NL |
345 | |
346 | return $this; | |
347 | } | |
348 | ||
349 | /** | |
4346a860 | 350 | * Get isStarred. |
9d50517c | 351 | * |
8eedc8cf | 352 | * @return bool |
9d50517c | 353 | */ |
905ae369 | 354 | public function isStarred() |
9d50517c | 355 | { |
905ae369 | 356 | return $this->isStarred; |
9d50517c NL |
357 | } |
358 | ||
189ef634 TC |
359 | /** |
360 | * @VirtualProperty | |
361 | * @SerializedName("is_starred") | |
362 | * @Groups({"entries_for_user", "export_all"}) | |
363 | */ | |
364 | public function is_Starred() | |
365 | { | |
366 | return (int) $this->isStarred(); | |
367 | } | |
368 | ||
163eae0b NL |
369 | public function toggleStar() |
370 | { | |
905ae369 | 371 | $this->isStarred = $this->isStarred() ^ 1; |
163eae0b NL |
372 | |
373 | return $this; | |
374 | } | |
375 | ||
9d50517c | 376 | /** |
4346a860 JB |
377 | * Set content. |
378 | * | |
379 | * @param string $content | |
9d50517c | 380 | * |
be463487 | 381 | * @return Entry |
9d50517c NL |
382 | */ |
383 | public function setContent($content) | |
384 | { | |
385 | $this->content = $content; | |
386 | ||
387 | return $this; | |
388 | } | |
389 | ||
390 | /** | |
4346a860 | 391 | * Get content. |
9d50517c | 392 | * |
7df80cb3 | 393 | * @return string |
9d50517c NL |
394 | */ |
395 | public function getContent() | |
396 | { | |
397 | return $this->content; | |
398 | } | |
399 | ||
400 | /** | |
5f09650e | 401 | * @return User |
9d50517c | 402 | */ |
5f09650e | 403 | public function getUser() |
9d50517c | 404 | { |
5f09650e | 405 | return $this->user; |
9d50517c | 406 | } |
42a90646 | 407 | |
7d1fdab2 TC |
408 | /** |
409 | * @VirtualProperty | |
410 | * @SerializedName("user_name") | |
411 | */ | |
412 | public function getUserName() | |
413 | { | |
414 | return $this->user->getUserName(); | |
415 | } | |
416 | ||
417 | /** | |
418 | * @VirtualProperty | |
419 | * @SerializedName("user_email") | |
420 | */ | |
421 | public function getUserEmail() | |
422 | { | |
423 | return $this->user->getEmail(); | |
424 | } | |
425 | ||
426 | /** | |
427 | * @VirtualProperty | |
428 | * @SerializedName("user_id") | |
429 | */ | |
430 | public function getUserId() | |
431 | { | |
432 | return $this->user->getId(); | |
433 | } | |
434 | ||
34d15eb4 | 435 | /** |
6d65c0a8 JB |
436 | * Set created_at. |
437 | * Only used when importing data from an other service. | |
438 | * | |
8664069e | 439 | * @param \DateTime $createdAt |
6d65c0a8 JB |
440 | * |
441 | * @return Entry | |
442 | */ | |
443 | public function setCreatedAt(\DateTime $createdAt) | |
444 | { | |
445 | $this->createdAt = $createdAt; | |
446 | ||
447 | return $this; | |
448 | } | |
449 | ||
450 | /** | |
8664069e | 451 | * @return \DateTime |
34d15eb4 NL |
452 | */ |
453 | public function getCreatedAt() | |
454 | { | |
455 | return $this->createdAt; | |
456 | } | |
457 | ||
34d15eb4 | 458 | /** |
8664069e | 459 | * @return \DateTime |
34d15eb4 NL |
460 | */ |
461 | public function getUpdatedAt() | |
462 | { | |
463 | return $this->updatedAt; | |
464 | } | |
465 | ||
466 | /** | |
be463487 | 467 | * @ORM\PrePersist |
34d15eb4 NL |
468 | * @ORM\PreUpdate |
469 | */ | |
be463487 | 470 | public function timestamps() |
34d15eb4 | 471 | { |
be463487 NL |
472 | if (is_null($this->createdAt)) { |
473 | $this->createdAt = new \DateTime(); | |
474 | } | |
475 | ||
34d15eb4 NL |
476 | $this->updatedAt = new \DateTime(); |
477 | } | |
478 | ||
479 | /** | |
4dc87223 | 480 | * @return ArrayCollection<Annotation> |
34d15eb4 | 481 | */ |
4dc87223 | 482 | public function getAnnotations() |
34d15eb4 | 483 | { |
4dc87223 | 484 | return $this->annotations; |
34d15eb4 NL |
485 | } |
486 | ||
487 | /** | |
4dc87223 | 488 | * @param Annotation $annotation |
34d15eb4 | 489 | */ |
4dc87223 | 490 | public function setAnnotation(Annotation $annotation) |
34d15eb4 | 491 | { |
4dc87223 | 492 | $this->annotations[] = $annotation; |
34d15eb4 NL |
493 | } |
494 | ||
495 | /** | |
496 | * @return string | |
497 | */ | |
498 | public function getMimetype() | |
499 | { | |
500 | return $this->mimetype; | |
501 | } | |
502 | ||
503 | /** | |
504 | * @param string $mimetype | |
505 | */ | |
506 | public function setMimetype($mimetype) | |
507 | { | |
508 | $this->mimetype = $mimetype; | |
509 | } | |
510 | ||
511 | /** | |
512 | * @return int | |
513 | */ | |
514 | public function getReadingTime() | |
515 | { | |
516 | return $this->readingTime; | |
517 | } | |
518 | ||
519 | /** | |
520 | * @param int $readingTime | |
521 | */ | |
522 | public function setReadingTime($readingTime) | |
523 | { | |
524 | $this->readingTime = $readingTime; | |
525 | } | |
526 | ||
527 | /** | |
528 | * @return string | |
529 | */ | |
530 | public function getDomainName() | |
531 | { | |
532 | return $this->domainName; | |
533 | } | |
534 | ||
535 | /** | |
536 | * @param string $domainName | |
537 | */ | |
538 | public function setDomainName($domainName) | |
539 | { | |
540 | $this->domainName = $domainName; | |
541 | } | |
542 | ||
0a018fe0 NL |
543 | /** |
544 | * @return ArrayCollection<Tag> | |
545 | */ | |
546 | public function getTags() | |
547 | { | |
548 | return $this->tags; | |
549 | } | |
550 | ||
b0458874 JB |
551 | /** |
552 | * @VirtualProperty | |
553 | * @SerializedName("tags") | |
554 | * @Groups({"entries_for_user", "export_all"}) | |
555 | */ | |
556 | public function getSerializedTags() | |
557 | { | |
558 | $data = []; | |
559 | foreach ($this->tags as $tag) { | |
560 | $data[] = $tag->getLabel(); | |
561 | } | |
562 | ||
563 | return $data; | |
564 | } | |
565 | ||
0a018fe0 NL |
566 | /** |
567 | * @param Tag $tag | |
568 | */ | |
569 | public function addTag(Tag $tag) | |
570 | { | |
625acf33 KG |
571 | if ($this->tags->contains($tag)) { |
572 | return; | |
573 | } | |
574 | ||
fc031e57 JB |
575 | // check if tag already exist but has not yet be persisted |
576 | // it seems that the previous condition with `contains()` doesn't check that case | |
577 | foreach ($this->tags as $existingTag) { | |
fc732227 | 578 | if ($existingTag->getLabel() === $tag->getLabel()) { |
fc031e57 JB |
579 | return; |
580 | } | |
581 | } | |
582 | ||
e42b13bc | 583 | $this->tags->add($tag); |
46bbd8d3 | 584 | $tag->addEntry($this); |
0a018fe0 | 585 | } |
092ca707 NL |
586 | |
587 | public function removeTag(Tag $tag) | |
588 | { | |
e42b13bc JB |
589 | if (!$this->tags->contains($tag)) { |
590 | return; | |
591 | } | |
592 | ||
092ca707 | 593 | $this->tags->removeElement($tag); |
e42b13bc | 594 | $tag->removeEntry($this); |
092ca707 | 595 | } |
fad31615 JB |
596 | |
597 | /** | |
a1413a3d | 598 | * Set previewPicture. |
fad31615 JB |
599 | * |
600 | * @param string $previewPicture | |
601 | * | |
602 | * @return Entry | |
603 | */ | |
604 | public function setPreviewPicture($previewPicture) | |
605 | { | |
606 | $this->previewPicture = $previewPicture; | |
607 | ||
608 | return $this; | |
609 | } | |
610 | ||
611 | /** | |
a1413a3d | 612 | * Get previewPicture. |
fad31615 JB |
613 | * |
614 | * @return string | |
615 | */ | |
616 | public function getPreviewPicture() | |
617 | { | |
618 | return $this->previewPicture; | |
619 | } | |
98f0929f JB |
620 | |
621 | /** | |
622 | * Set language. | |
623 | * | |
624 | * @param string $language | |
625 | * | |
626 | * @return Entry | |
627 | */ | |
628 | public function setLanguage($language) | |
629 | { | |
630 | $this->language = $language; | |
631 | ||
632 | return $this; | |
633 | } | |
634 | ||
635 | /** | |
636 | * Get language. | |
637 | * | |
638 | * @return string | |
639 | */ | |
640 | public function getLanguage() | |
641 | { | |
642 | return $this->language; | |
643 | } | |
f3d0cb91 NL |
644 | |
645 | /** | |
78b3c31d | 646 | * @return string |
f3d0cb91 | 647 | */ |
7239082a | 648 | public function getUid() |
f3d0cb91 | 649 | { |
7239082a | 650 | return $this->uid; |
f3d0cb91 NL |
651 | } |
652 | ||
653 | /** | |
7239082a | 654 | * @param string $uid |
f3d0cb91 NL |
655 | * |
656 | * @return Entry | |
657 | */ | |
7239082a | 658 | public function setUid($uid) |
f3d0cb91 | 659 | { |
7239082a | 660 | $this->uid = $uid; |
f3d0cb91 NL |
661 | |
662 | return $this; | |
663 | } | |
664 | ||
7239082a | 665 | public function generateUid() |
f3d0cb91 | 666 | { |
7239082a | 667 | if (null === $this->uid) { |
a7e2218e | 668 | // @see http://blog.kevingomez.fr/til/2015/07/26/why-is-uniqid-slow/ for true parameter |
7239082a | 669 | $this->uid = uniqid('', true); |
f3d0cb91 NL |
670 | } |
671 | } | |
f1be7af4 | 672 | |
7239082a | 673 | public function cleanUid() |
f1be7af4 | 674 | { |
7239082a | 675 | $this->uid = null; |
f1be7af4 | 676 | } |
10b35097 NL |
677 | |
678 | /** | |
679 | * @return int | |
680 | */ | |
681 | public function getHttpStatus() | |
682 | { | |
683 | return $this->httpStatus; | |
684 | } | |
685 | ||
686 | /** | |
687 | * @param int $httpStatus | |
688 | * | |
689 | * @return Entry | |
690 | */ | |
691 | public function setHttpStatus($httpStatus) | |
692 | { | |
693 | $this->httpStatus = $httpStatus; | |
694 | ||
695 | return $this; | |
696 | } | |
5e9009ce NL |
697 | |
698 | /** | |
699 | * @return \Datetime | |
700 | */ | |
701 | public function getPublishedAt() | |
702 | { | |
703 | return $this->publishedAt; | |
704 | } | |
705 | ||
706 | /** | |
707 | * @param \Datetime $publishedAt | |
708 | * | |
709 | * @return Entry | |
710 | */ | |
711 | public function setPublishedAt(\Datetime $publishedAt) | |
712 | { | |
713 | $this->publishedAt = $publishedAt; | |
714 | ||
715 | return $this; | |
716 | } | |
7b0b3622 NL |
717 | |
718 | /** | |
719 | * @return string | |
720 | */ | |
721 | public function getPublishedBy() | |
722 | { | |
723 | return $this->publishedBy; | |
724 | } | |
725 | ||
726 | /** | |
727 | * @param string $publishedBy | |
728 | * | |
729 | * @return Entry | |
730 | */ | |
731 | public function setPublishedBy($publishedBy) | |
732 | { | |
733 | $this->publishedBy = $publishedBy; | |
734 | ||
735 | return $this; | |
736 | } | |
9d50517c | 737 | } |