FilterComparator uses ConstantsTrait
Table of Contents
Constants
- BETWEEN : string = 'between'
- CONTAINS : string = 'contains'
- DISTANCE : string = 'distance'
- EQ : string = 'eq'
- EW : string = 'ew'
- GE : string = 'ge'
- GT : string = 'gt'
- IN : string = 'in'
- LE : string = 'le'
- LIKE : string = 'like'
- LT : string = 'lt'
- MATCH : string = 'match'
- NCONTAINS : string = 'ncontains'
- NE : string = 'ne'
- NEW : string = 'new'
- NIN : string = 'nin'
- NLIKE : string = 'nlike'
- NMATCH : string = 'nmatch'
- NREGEX : string = 'nregex'
- NSW : string = 'nsw'
- REGEX : string = 'regex'
- SW : string = 'sw'
- __ALIAS__ : array<string|int, mixed> = [self::EQ => \oihana\arango\db\enums\Comparator...
Methods
- getAlias() : mixed
- Returns a valid filter operator alias or the default alias.
- supported() : array<int, string>
- The operator codes this catalogue can translate on its own, in declaration order.
Constants
BETWEEN
public
string
BETWEEN
= 'between'
CONTAINS
public
string
CONTAINS
= 'contains'
DISTANCE
public
string
DISTANCE
= 'distance'
EQ
public
string
EQ
= 'eq'
EW
public
string
EW
= 'ew'
GE
public
string
GE
= 'ge'
GT
public
string
GT
= 'gt'
IN
public
string
IN
= 'in'
LE
public
string
LE
= 'le'
LIKE
public
string
LIKE
= 'like'
LT
public
string
LT
= 'lt'
MATCH
public
string
MATCH
= 'match'
NCONTAINS
public
string
NCONTAINS
= 'ncontains'
NE
public
string
NE
= 'ne'
NEW
public
string
NEW
= 'new'
NIN
public
string
NIN
= 'nin'
NLIKE
public
string
NLIKE
= 'nlike'
NMATCH
public
string
NMATCH
= 'nmatch'
NREGEX
public
string
NREGEX
= 'nregex'
NSW
public
string
NSW
= 'nsw'
REGEX
public
string
REGEX
= 'regex'
SW
public
string
SW
= 'sw'
__ALIAS__
protected
array<string|int, mixed>
__ALIAS__
= [self::EQ => \oihana\arango\db\enums\Comparator::EQUAL, self::GE => \oihana\arango\db\enums\Comparator::GREATER_THAN_OR_EQUAL, self::GT => \oihana\arango\db\enums\Comparator::GREATER_THAN, self::IN => \oihana\arango\db\enums\Comparator::IN, self::LE => \oihana\arango\db\enums\Comparator::LESS_THAN_OR_EQUAL, self::LT => \oihana\arango\db\enums\Comparator::LESS_THAN, self::LIKE => \oihana\arango\db\enums\Comparator::LIKE, self::MATCH => \oihana\arango\db\enums\Comparator::MATCH, self::NMATCH => \oihana\arango\db\enums\Comparator::NOT_MATCH, self::NE => \oihana\arango\db\enums\Comparator::NOT_EQUAL, self::NIN => \oihana\arango\db\enums\Comparator::NOT_IN, self::NLIKE => \oihana\arango\db\enums\Comparator::NOT_LIKE]
Methods
getAlias()
Returns a valid filter operator alias or the default alias.
public
static getAlias(mixed $value[, mixed|null $default = Comparator::EQUAL ]) : mixed
Parameters
- $value : mixed
- $default : mixed|null = Comparator::EQUAL
supported()
The operator codes this catalogue can translate on its own, in declaration order.
public
static supported() : array<int, string>
These are the infix comparators — the ones any filter type understands, whatever
the field holds. The function forms (sw, ew, contains, regex and their
negations) are deliberately absent: they are handled upstream by the filter types
that can honour them, and reaching this catalogue with one of them means the type at
hand cannot. Same for between, resolved by the string, number and date filters, and
for distance, which belongs to the geo filter.
Used to tell a caller what is accepted where their operator was refused.