FileAccess Orion

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

Tags
category

Interface function

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.171

Table of Contents

$empty  : bool
Allow empty
$field  : mixed
$is_or  : bool
Is or filter
$value  : mixed
Field()  : mixed
Get the filed
IsOr()  : bool
Is or connection?
ToQuery()  : string
To query Convert the search filter instance to search query string
ToSqlQuery()  : SqlTerm|array<string|int, SqlTerm>|null
Create a sql query based on this filter

Properties

Methods

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()

To query Convert the search filter instance to search query string

public abstract ToQuery() : string
Return values
string

The search query

Search results