3 namespace Wallabag\CoreBundle\Entity
;
5 use Doctrine\ORM\Mapping
as ORM
;
6 use Symfony\Component\Validator\Constraints
as Assert
;
7 use KPhoen\RulerZBundle\Validator\Constraints
as RulerZAssert
;
12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TaggingRuleRepository")
21 * @ORM\Column(name="id", type="integer")
23 * @ORM\GeneratedValue(strategy="AUTO")
31 * @RulerZAssert\ValidRule(allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"})
32 * @ORM\Column(name="rule", type="string", nullable=false)
40 * @ORM\Column(name="tags", type="simple_array", nullable=false)
45 * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", inversedBy="taggingRules")
54 public function getId()
66 public function setRule($rule)
78 public function getRule()
86 * @param array<string> $tags
90 public function setTags(array $tags)
100 * @return array<string>
102 public function getTags()
110 * @param Config $config
112 * @return TaggingRule
114 public function setConfig(Config
$config)
116 $this->config
= $config;
126 public function getConfig()
128 return $this->config
;