aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entry.php108
1 files changed, 85 insertions, 23 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php
index 7276b437..08a67c34 100644
--- a/src/Wallabag/CoreBundle/Entity/Entry.php
+++ b/src/Wallabag/CoreBundle/Entity/Entry.php
@@ -122,6 +122,24 @@ class Entry
122 private $updatedAt; 122 private $updatedAt;
123 123
124 /** 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
133 /**
134 * @var array
135 *
136 * @ORM\Column(name="published_by", type="array", nullable=true)
137 *
138 * @Groups({"entries_for_user", "export_all"})
139 */
140 private $publishedBy;
141
142 /**
125 * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) 143 * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"})
126 * @ORM\JoinTable 144 * @ORM\JoinTable
127 * 145 *
@@ -175,22 +193,22 @@ class Entry
175 private $previewPicture; 193 private $previewPicture;
176 194
177 /** 195 /**
178 * @var bool 196 * @var string
179 * 197 *
180 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false}) 198 * @ORM\Column(name="http_status", type="string", length=3, nullable=true)
181 * 199 *
182 * @Groups({"export_all"}) 200 * @Groups({"entries_for_user", "export_all"})
183 */ 201 */
184 private $isPublic; 202 private $httpStatus;
185 203
186 /** 204 /**
187 * @var string 205 * @var array
188 * 206 *
189 * @ORM\Column(name="http_status", type="string", length=3, nullable=true) 207 * @ORM\Column(name="headers", type="array", nullable=true)
190 * 208 *
191 * @Groups({"entries_for_user", "export_all"}) 209 * @Groups({"entries_for_user", "export_all"})
192 */ 210 */
193 private $httpStatus; 211 private $headers;
194 212
195 /** 213 /**
196 * @Exclude 214 * @Exclude
@@ -532,22 +550,6 @@ class Entry
532 } 550 }
533 551
534 /** 552 /**
535 * @return bool
536 */
537 public function isPublic()
538 {
539 return $this->isPublic;
540 }
541
542 /**
543 * @param bool $isPublic
544 */
545 public function setIsPublic($isPublic)
546 {
547 $this->isPublic = $isPublic;
548 }
549
550 /**
551 * @return ArrayCollection<Tag> 553 * @return ArrayCollection<Tag>
552 */ 554 */
553 public function getTags() 555 public function getTags()
@@ -701,4 +703,64 @@ class Entry
701 703
702 return $this; 704 return $this;
703 } 705 }
706
707 /**
708 * @return \Datetime
709 */
710 public function getPublishedAt()
711 {
712 return $this->publishedAt;
713 }
714
715 /**
716 * @param \Datetime $publishedAt
717 *
718 * @return Entry
719 */
720 public function setPublishedAt(\Datetime $publishedAt)
721 {
722 $this->publishedAt = $publishedAt;
723
724 return $this;
725 }
726
727 /**
728 * @return array
729 */
730 public function getPublishedBy()
731 {
732 return $this->publishedBy;
733 }
734
735 /**
736 * @param array $publishedBy
737 *
738 * @return Entry
739 */
740 public function setPublishedBy($publishedBy)
741 {
742 $this->publishedBy = $publishedBy;
743
744 return $this;
745 }
746
747 /**
748 * @return array
749 */
750 public function getHeaders()
751 {
752 return $this->headers;
753 }
754
755 /**
756 * @param array $headers
757 *
758 * @return Entry
759 */
760 public function setHeaders($headers)
761 {
762 $this->headers = $headers;
763
764 return $this;
765 }
704} 766}