Move readingTime & domainName in ContentProxy

So, everything is centralized in one place when we save a new entry.
This commit is contained in:
Jeremy Benoist
2015-09-28 19:35:33 +02:00
parent 34c2cc7a1a
commit da3d4998c0
4 changed files with 25 additions and 7 deletions

View File

@ -7,7 +7,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Hateoas\Configuration\Annotation as Hateoas;
use JMS\Serializer\Annotation\XmlRoot;
use Wallabag\CoreBundle\Tools\Utils;
/**
* Entry.
@ -279,8 +278,6 @@ class Entry
public function setContent($content)
{
$this->content = $content;
$this->readingTime = Utils::getReadingTime($content);
$this->domainName = parse_url($this->url, PHP_URL_HOST);
return $this;
}