FileAccess Orion

FilterIn extends SearchFilter
in package

Search filter in array object

This is the equality filter.

Tags
category

Interface function

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.152

Table of Contents

$values  : scalar|array<string|int, mixed>
the list of allowed values
$empty  : bool
Allow empty
$field  : mixed
$is_or  : bool
Is or filter
$value  : mixed
__construct()  : mixed
Filter in constructor.
Field()  : mixed
Get the filed
IsOr()  : bool
Is or connection?
Matches()  : bool
ToQuery()  : string
Create query Convert to solr search query like name:(x OR y OR...)
ToSqlQuery()  : SqlTerm|array<string|int, SqlTerm>|null
Create a sql query based on this filter

Properties

$values

the list of allowed values

public scalar|array<string|int, mixed> $values

Methods

__construct()

Filter in constructor.

public __construct(string $field, string|array<string|int, mixed> $list[, bool $is_or = false ]) : mixed

Create a filter with multiple allowed options to search for, is an or connection

Parameters
$field : string

The search field

$list : string|array<string|int, mixed>

A list of possible selects.

$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

Matches()

public Matches(array<string|int, mixed>|object $entity) : bool
Parameters
$entity : array<string|int, mixed>|object
Return values
bool

ToQuery()

Create query Convert to solr search query like name:(x OR y OR...)

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
Tags
inheritDoc
Return values
SqlTerm|array<string|int, SqlTerm>|null

Search results