Oihana PHP Arango

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

__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

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.

Return values
array<int, string>
On this page

Search results