ModifierOperators
Trait to represent logic modifier operators.
Table of Contents
Properties
- $allNextFilter : bool
- $anyNextFilter : bool
- $negateNextFilter : bool
Methods
- all() : PostgrestRequestBuilder
- Enable 'all' modifier for next operator (which supports it).
- any() : PostgrestRequestBuilder
- Enable 'any' modifier for next operator (which supports it).
- not() : PostgrestRequestBuilder
- Negate next operator.
- allOperator() : string
- Prepend 'all' modifier to operator.
- anyOperator() : string
- Prepend 'any' modifier to operator.
- applyOperatorModifier() : string
- Apply active modifier to operator.
- checkOperatorModifier() : void
- Check whether all values in an array are of same type and check whether a modifier is active.
- negateOperator() : string
- Prepend negation to operator if necessary.
Properties
$allNextFilter
private
bool
$allNextFilter
= false
$anyNextFilter
private
bool
$anyNextFilter
= false
$negateNextFilter
private
bool
$negateNextFilter
= false
Methods
all()
Enable 'all' modifier for next operator (which supports it).
public
all() : PostgrestRequestBuilder
Tags
Return values
PostgrestRequestBuilder —The PostgrestRequestBuilder instance.
any()
Enable 'any' modifier for next operator (which supports it).
public
any() : PostgrestRequestBuilder
Tags
Return values
PostgrestRequestBuilder —The PostgrestRequestBuilder instance.
not()
Negate next operator.
public
not() : PostgrestRequestBuilder
Tags
Return values
PostgrestRequestBuilder —The PostgrestRequestBuilder instance.
allOperator()
Prepend 'all' modifier to operator.
private
allOperator(string $operator) : string
Parameters
- $operator : string
-
The operator to use.
Return values
string —The operator.
anyOperator()
Prepend 'any' modifier to operator.
private
anyOperator(string $operator) : string
Parameters
- $operator : string
-
The operator to use.
Return values
string —The operator.
applyOperatorModifier()
Apply active modifier to operator.
private
applyOperatorModifier(string $operator) : string
Parameters
- $operator : string
-
The operator to use.
Return values
string —The operator.
checkOperatorModifier()
Check whether all values in an array are of same type and check whether a modifier is active.
private
checkOperatorModifier(int $numValues, array<string|int, string>|array<string|int, int>|array<string|int, float> $value) : void
Parameters
- $numValues : int
-
The number of values in the array.
- $value : array<string|int, string>|array<string|int, int>|array<string|int, float>
-
The array to check.
Tags
negateOperator()
Prepend negation to operator if necessary.
private
negateOperator(Operator $operator, bool $negate) : string
Parameters
- $operator : Operator
-
The operator to use.
- $negate : bool
-
Whether to negate the operator.
Return values
string —The operator.