Conditions are used for the WHERE part of the query. Think of each Condition as enclosed in parentheses ().
You start with an initial test: Field Operator Value (FOV) tupple.
You can then add additional FOV tupples with a logical operator (AND, OR, AND NOT, OR NOT) separating the previous FOV tupple.
To add a sub condition in parentheses, add another Condition with the same logical operator separator.
- Implements
Countable Stringable
Methods |
public __construct(?string $field = NULL, ?mixed $value = NULL, PHPFUI Start a Condition with a Field Operator Value (FOV) tupple. Will try to parse FOV from string if $operator is null.
|
public __toString() : string
|
public and(PHPFUI Add logical AND between FOV tupples or Condition |
public andNot(PHPFUI Add logical AND NOT between FOV tupples or Condition |
public count() : int
|
public getFields(?self $condition = NULL) : array
|
public getInput() : array
|
public getJSON() : string |
public or(PHPFUI Add logical OR between FOV tupples or Condition |
public orNot(PHPFUI Add logical OR NOT between FOV tupples or Condition |
Properties |
private array $conditions = []
|
Methods |
private add(string $logical, PHPFUI Internal method to type check $condition parameter |
private getConditionArray(array $conditions) : array
|