2017-04-20 14:58:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Wallabag\CoreBundle\Operator\PHP;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides a "notmatches" operator used for tagging rules.
|
|
|
|
*
|
|
|
|
* It asserts that a given pattern is not contained in a subject, in a
|
|
|
|
* case-insensitive way.
|
|
|
|
*
|
|
|
|
* This operator will be used to compile tagging rules in PHP, usable
|
|
|
|
* directly on Entry objects for instance.
|
2022-04-24 18:26:14 +02:00
|
|
|
* It's registered in RulerZ using a service;
|
2017-04-20 14:58:20 +02:00
|
|
|
*/
|
|
|
|
class NotMatches
|
|
|
|
{
|
|
|
|
public function __invoke($subject, $pattern)
|
|
|
|
{
|
2017-10-09 16:47:15 +02:00
|
|
|
return false === stripos($subject, $pattern);
|
2017-04-20 14:58:20 +02:00
|
|
|
}
|
|
|
|
}
|