PHP Class Wallabag\CoreBundle\Helper\RuleBasedTagger

ファイルを表示 Open project: wallabag/wallabag

Public Methods

Method Description
__construct ( RulerZ\RulerZ $rulerz, TagRepository $tagRepository, EntryRepository $entryRepository )
tag ( Entry $entry ) Add tags from rules defined by the user.
tagAllForUser ( User $user ) : array Apply all the tagging rules defined by a user on its entries.

Private Methods

Method Description
getRulesForUser ( User $user ) : array Retrieves the tagging rules for a given user.
getTag ( string $label ) : Wallabag\CoreBundle\Entity\Tag Fetch a tag.

Method Details

__construct() public method

public __construct ( RulerZ\RulerZ $rulerz, TagRepository $tagRepository, EntryRepository $entryRepository )
$rulerz RulerZ\RulerZ
$tagRepository Wallabag\CoreBundle\Repository\TagRepository
$entryRepository Wallabag\CoreBundle\Repository\EntryRepository

tag() public method

Add tags from rules defined by the user.
public tag ( Entry $entry )
$entry Wallabag\CoreBundle\Entity\Entry Entry to tag

tagAllForUser() public method

Apply all the tagging rules defined by a user on its entries.
public tagAllForUser ( User $user ) : array
$user Wallabag\UserBundle\Entity\User
return array