FilterNotNull
extends SearchFilter
in package
Define search filter
Define the interface for search filter object, this class provides base method requirements so the filter can be used in our search engines in a generic way. Sub filter implementations need to implement the methods to be represented as solr query term at least should for sql as well
Table of Contents
- $empty : bool
- Allow empty
- $field : mixed
- $is_or : bool
- Is or filter
- $value : mixed
- __construct() : mixed
- Field must not be null
- Field() : mixed
- Get the filed
- IsOr() : bool
- Is or connection?
- ToQuery() : string
- Create query Convert to solr search query like length:[* TO 200]
- 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()
Field must not be null
public
__construct(string $field[, bool $is_or = false ]) : mixed
Parameters
- $field : string
-
Name of the search field
- $is_or : bool = false
-
Merge with other filters with or
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
ToQuery()
Create query Convert to solr search query like length:[* TO 200]
public
ToQuery() : string
Return values
string —The search query
ToSqlQuery()
Create a sql query based on this filter
public
ToSqlQuery() : SqlTerm|array<string|int, SqlTerm>|null