use Symfony\Component\Validator\Constraints as Assert;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\XmlRoot;
+use Wallabag\CoreBundle\Helper\Tools;
/**
* Entry.
/**
* @var int
*
- * @ORM\Column(name="reading_type", type="integer", nullable=true)
+ * @ORM\Column(name="reading_time", type="integer", nullable=true)
*/
private $readingTime;
public function setContent($content)
{
$this->content = $content;
+ $this->readingTime = Tools::getReadingTime($content);
+ $this->domainName = parse_url($this->url, PHP_URL_HOST);
return $this;
}