FilterNot
extends SearchFilter
in package
Search filter object
This is the not equal filter.
Tags
Table of Contents
- $empty : bool
- Allow empty
- $field : mixed
- $is_or : bool
- Is or filter
- $value : mixed
- __construct() : mixed
- Filter constructor.
- Field() : mixed
- Get the filed
- IsOr() : bool
- Is or connection?
- Matches() : bool
- ToQuery() : string
- Create query
- ToSqlQuery() : SqlTerm|array<string|int, SqlTerm>|null
- Create a sql query based on this filter
Properties
$empty
Allow empty
protected
bool
$empty
= false
$field
protected
mixed
$field
$is_or
Is or filter
protected
bool
$is_or
= false
$value
protected
mixed
$value
Methods
__construct()
Filter constructor.
public
__construct(string|array<string|int, mixed> $field, mixed $value[, bool $is_or = false ][, bool $empty = false ]) : mixed
Create an equality search filter where field name must be the same as input
Parameters
- $field : string|array<string|int, mixed>
-
Name of the search field
- $value : mixed
-
The search value, can be a scalar but an array as well
- $is_or : bool = false
-
Merge with other filters with or
- $empty : bool = false
-
Allow empty value
Return values
mixed —Field()
Get the filed
public
Field() : mixed
Return values
mixed —IsOr()
Is or connection?
public
IsOr() : bool
When merged with other filter use OR instead of AND
Return values
bool —Is or merge
Matches()
public
Matches(array<string|int, mixed>|object $entity) : bool
Parameters
- $entity : array<string|int, mixed>|object
Return values
bool —ToQuery()
Create query
public
ToQuery() : string
Convert to solr search query like name:test
Return values
string —The search query
ToSqlQuery()
Create a sql query based on this filter
public
ToSqlQuery() : SqlTerm|array<string|int, SqlTerm>|null