use Symfony\Component\Validator\Constraints as Assert;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\XmlRoot;
+use Wallabag\CoreBundle\Tools\Utils;
/**
* Entry.
/**
* @var int
*
- * @ORM\Column(name="reading_type", type="integer", nullable=true)
+ * @ORM\Column(name="reading_time", type="integer", nullable=true)
*/
private $readingTime;
*/
private $domainName;
+ /**
+ * @var string
+ *
+ * @ORM\Column(name="preview_picture", type="text", nullable=true)
+ */
+ private $previewPicture;
+
/**
* @var bool
*
public function setContent($content)
{
$this->content = $content;
+ $this->readingTime = Utils::getReadingTime($content);
+ $this->domainName = parse_url($this->url, PHP_URL_HOST);
return $this;
}
{
$this->tags->removeElement($tag);
}
+
+ /**
+ * Set previewPicture.
+ *
+ * @param string $previewPicture
+ *
+ * @return Entry
+ */
+ public function setPreviewPicture($previewPicture)
+ {
+ $this->previewPicture = $previewPicture;
+
+ return $this;
+ }
+
+ /**
+ * Get previewPicture.
+ *
+ * @return string
+ */
+ public function getPreviewPicture()
+ {
+ return $this->previewPicture;
+ }
}