Contains
class Contains extends StringComparator (View source)
Check if a string contains any or all of the search strings, with support for case insensitivity.
Traits
Methods
__construct(array|string $search, bool $caseSensitive = true, bool $all = true)
No description
bool
checkString(string $value)
Compare the input string against the comparator.
Details
__construct(array|string $search, bool $caseSensitive = true, bool $all = true)
No description
final bool
__invoke(mixed $value)
Compare the input value against the comparator.
static Contains
all(array|string $search, bool $caseSensitive = true)
No description
static Contains
any(array|string $search, bool $caseSensitive = true)
No description
final bool
check(mixed $value)
Compare the input string against the comparator.
protected bool
checkString(string $value)
Compare the input string against the comparator.
static Contains
make(array|string $search, bool $caseSensitive = true, bool $all = true)
No description
protected string
resolveStringInput(mixed $value)
No description