A logical expression that evaluates to a boolean.
Public Static Methods | |
static self | match (DB $db, $a, $b) |
Null-safe equality Predicate from mixed arguments. More... | |
Public Static Methods inherited from Expression | |
magic static self | factory (DB $db, string $expression) |
Public Methods | |
Predicate | lAnd (string ... $predicates) |
Logical AND More... | |
self | lNot () |
Logical NOT More... | |
Predicate | lOr (string ... $predicates) |
Logical OR More... | |
Public Methods inherited from Expression | |
__construct (DB $db, string $expression) | |
string | __toString () |
Additional Inherited Members | |
Protected Properties inherited from Expression | |
DB | $db |
string | $expression |
Predicate lAnd | ( | string ... | $predicates | ) |
self lNot | ( | ) |
Predicate lOr | ( | string ... | $predicates | ) |
|
static |
Null-safe equality Predicate from mixed arguments.
If $a
is an integer (enumerated item), returns $b
as a Predicate
If $b
is a closure, returns from $b($a, DB $this)
If $b
is an EntityInterface, the ID is used.
If $b
is an array, returns $a IN (...quoted $b)
If $b
is a Select, returns $a IN ($b->toSql())
Otherwise predicates upon $a = quoted $b
scalar | $a | |
null | scalar | array | Closure | EntityInterface | Select | ValueInterface | $b |