wallabag/src/Operator/PHP/NotMatches.php

22 lines
506 B
PHP
Raw Normal View History

<?php
2024-02-19 00:30:12 +00:00
namespace Wallabag\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.
* It's registered in RulerZ using a service;
*/
class NotMatches
{
public function __invoke($subject, $pattern)
{
2017-10-09 14:47:15 +00:00
return false === stripos($subject, $pattern);
}
}