diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2019-08-11 23:51:55 +0200 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2020-04-25 15:59:23 +0200 |
commit | f39c5a2a702036750b4d7c32d02e7f92955a4eed (patch) | |
tree | 267e1488312d8c336ef937bbe6baeddc9441f694 /src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php | |
parent | 24230a5130005e274e1d8d3fe8eaca13cb978b9c (diff) | |
download | wallabag-f39c5a2a702036750b4d7c32d02e7f92955a4eed.tar.gz wallabag-f39c5a2a702036750b4d7c32d02e7f92955a4eed.tar.zst wallabag-f39c5a2a702036750b4d7c32d02e7f92955a4eed.zip |
Add new Helper to process Ignore Origin rules and RulerZ operator
This commits adds a new helper like RuleBasedTagger for processing
ignore origin rules. It also adds a new custom RulerZ operator for the
'~' pattern matching rule.
Renames 'pattern' with '_all' in IgnoreOriginRule entity.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php index befd6090..0b6f318d 100644 --- a/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php +++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginUserRule.php | |||
@@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraints as Assert; | |||
11 | * | 11 | * |
12 | * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository") | 12 | * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginUserRuleRepository") |
13 | * @ORM\Table(name="`ignore_origin_user_rule`") | 13 | * @ORM\Table(name="`ignore_origin_user_rule`") |
14 | * @ORM\Entity | ||
15 | */ | 14 | */ |
16 | class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface | 15 | class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface |
17 | { | 16 | { |
@@ -30,7 +29,7 @@ class IgnoreOriginUserRule implements IgnoreOriginRuleInterface, RuleInterface | |||
30 | * @Assert\NotBlank() | 29 | * @Assert\NotBlank() |
31 | * @Assert\Length(max=255) | 30 | * @Assert\Length(max=255) |
32 | * @RulerZAssert\ValidRule( | 31 | * @RulerZAssert\ValidRule( |
33 | * allowed_variables={"host","pattern"}, | 32 | * allowed_variables={"host","_all"}, |
34 | * allowed_operators={"=","~"} | 33 | * allowed_operators={"=","~"} |
35 | * ) | 34 | * ) |
36 | * @ORM\Column(name="rule", type="string", nullable=false) | 35 | * @ORM\Column(name="rule", type="string", nullable=false) |