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 Value Operator (FVO) tupple.
You can then add additional FVO tupples with a logical operator (AND, OR, AND NOT, OR NOT) separating the previous FVO tupple.
To add a sub condition in parentheses, add another Condition with the same logical operator separator.
- Implements
Countable Stringable
Methods |
public __construct(PHPFUI Start a Condition with a Field Value Operator (FVO) tupple. Will try to parse FVO from string if $operator is null.
|
public __toString() : string
|
public and(PHPFUI Add logical AND between FVO tupples or Condition |
public andNot(PHPFUI Add logical AND NOT between FVO tupples or Condition |
public count() : int
|
public getFields() : array
|
public getInput() : array
|
public getJSON() : string |
public or(PHPFUI Add logical OR between FVO tupples or Condition |
public orNot(PHPFUI Add logical OR NOT between FVO 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
|