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 * @Assert\Length(max=255)
32 * @RulerZAssert\ValidRule(
33 * allowed_variables={"title", "url", "isArchived", "isStared", "content", "language", "mimetype", "readingTime", "domainName"},
34 * allowed_operators={">", "<", ">=", "<=", "=", "is", "!=", "and", "not", "or", "matches", "notmatches"}
36 * @ORM\Column(name="rule", type="string", nullable=false)
44 * @ORM\Column(name="tags", type="simple_array", nullable=false)
49 * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Config", inversedBy="taggingRules")
58 public function getId()
70 public function setRule($rule)
82 public function getRule()
90 * @param array <string> $tags
94 public function setTags(array $tags)
104 * @return array<string>
106 public function getTags()
114 * @param Config $config
116 * @return TaggingRule
118 public function setConfig(Config
$config)
120 $this->config
= $config;
130 public function getConfig()
132 return $this->config
;