aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
diff options
context:
space:
mode:
authorKevin Decherf <kevin@kdecherf.com>2019-08-11 23:51:55 +0200
committerKevin Decherf <kevin@kdecherf.com>2020-04-25 15:59:23 +0200
commitf39c5a2a702036750b4d7c32d02e7f92955a4eed (patch)
tree267e1488312d8c336ef937bbe6baeddc9441f694 /src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
parent24230a5130005e274e1d8d3fe8eaca13cb978b9c (diff)
downloadwallabag-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/IgnoreOriginInstanceRule.php')
-rw-r--r--src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php b/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
index 34aed50c..ce3b6e7d 100644
--- a/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
+++ b/src/Wallabag/CoreBundle/Entity/IgnoreOriginInstanceRule.php
@@ -11,7 +11,6 @@ use Symfony\Component\Validator\Constraints as Assert;
11 * 11 *
12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository") 12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\IgnoreOriginInstanceRuleRepository")
13 * @ORM\Table(name="`ignore_origin_instance_rule`") 13 * @ORM\Table(name="`ignore_origin_instance_rule`")
14 * @ORM\Entity
15 */ 14 */
16class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterface 15class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterface
17{ 16{
@@ -30,7 +29,7 @@ class IgnoreOriginInstanceRule implements IgnoreOriginRuleInterface, RuleInterfa
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)