3 namespace Wallabag\CoreBundle\Entity
;
5 use Doctrine\ORM\Mapping
as ORM
;
6 use KPhoen\RulerZBundle\Validator\Constraints
as RulerZAssert
;
7 use Symfony\Component\Validator\Constraints
as Assert
;
12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\TaggingRuleRepository")
13 * @ORM\Table(name="`tagging_rule`")
21 * @ORM\Column(name="id", type="integer")
23 * @ORM\GeneratedValue(strategy="AUTO")
31 * @RulerZAssert\ValidRule(
32 * allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"},
33 * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or", "matches"}
35 * @ORM\Column(name="rule", type="string", nullable=false)
43 * @ORM\Column(name="tags", type="simple_array", nullable=false)
48 * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", inversedBy="taggingRules")
57 public function getId()
69 public function setRule($rule)
81 public function getRule()
89 * @param array<string> $tags
93 public function setTags(array $tags)
103 * @return array<string>
105 public function getTags()
113 * @param Config $config
115 * @return TaggingRule
117 public function setConfig(Config
$config)
119 $this->config
= $config;
129 public function getConfig()
131 return $this->config
;