aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Helper/ContentProxy.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper/ContentProxy.php')
-rw-r--r--src/Wallabag/CoreBundle/Helper/ContentProxy.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/ContentProxy.php b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
index 3de8828f..7fb41393 100644
--- a/src/Wallabag/CoreBundle/Helper/ContentProxy.php
+++ b/src/Wallabag/CoreBundle/Helper/ContentProxy.php
@@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Helper;
4 4
5use Graby\Graby; 5use Graby\Graby;
6use Wallabag\CoreBundle\Entity\Entry; 6use Wallabag\CoreBundle\Entity\Entry;
7use Wallabag\CoreBundle\Tools\Utils;
7 8
8/** 9/**
9 * This kind of proxy class take care of getting the content from an url 10 * This kind of proxy class take care of getting the content from an url
@@ -51,6 +52,8 @@ class ContentProxy
51 $entry->setContent($html); 52 $entry->setContent($html);
52 $entry->setLanguage($content['language']); 53 $entry->setLanguage($content['language']);
53 $entry->setMimetype($content['content_type']); 54 $entry->setMimetype($content['content_type']);
55 $entry->setReadingTime(Utils::getReadingTime($html));
56 $entry->setDomainName(parse_url($entry->getUrl(), PHP_URL_HOST));
54 57
55 if (isset($content['open_graph']['og_image'])) { 58 if (isset($content['open_graph']['og_image'])) {
56 $entry->setPreviewPicture($content['open_graph']['og_image']); 59 $entry->setPreviewPicture($content['open_graph']['og_image']);