forked from wallabag/wallabag
PoC of rule-based tagging
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user