mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
PoC of rule-based tagging
This commit is contained in:
parent
0a0c600887
commit
c3510620ad
6 changed files with 855 additions and 30 deletions
|
@ -13,10 +13,12 @@ use Wallabag\CoreBundle\Tools\Utils;
|
|||
class ContentProxy
|
||||
{
|
||||
protected $graby;
|
||||
protected $tagger;
|
||||
|
||||
public function __construct(Graby $graby)
|
||||
public function __construct(Graby $graby, RuleBasedTagger $tagger)
|
||||
{
|
||||
$this->graby = $graby;
|
||||
$this->graby = $graby;
|
||||
$this->tagger = $tagger;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,6 +61,8 @@ class ContentProxy
|
|||
$entry->setPreviewPicture($content['open_graph']['og_image']);
|
||||
}
|
||||
|
||||
$this->tagger->tag($entry);
|
||||
|
||||
return $entry;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue