5
5
/**
6
6
* Conditions are used for the WHERE part of the query. Think of each Condition as enclosed in parentheses ().
7
7
*
8
- * You start with an initial test: Field Operator Value (FOV ) tupple.
8
+ * You start with an initial test: Field Value Operator (FVO ) tupple.
9
9
*
10
- * You can then add additional FOV tupples with a logical operator (AND, OR, AND NOT, OR NOT) separating the previous FOV tupple.
10
+ * You can then add additional FVO tupples with a logical operator (AND, OR, AND NOT, OR NOT) separating the previous FVO tupple.
11
11
*
12
12
* To add a sub condition in parentheses, add another Condition with the same logical operator separator.
13
13
*/
@@ -17,12 +17,12 @@ class Condition implements \Countable, \Stringable
17
17
private array $ conditions = [];
18
18
19
19
/**
20
- * Start a Condition with a Field Operator Value (FOV ) tupple.
20
+ * Start a Condition with a Field Value Operator (FVO ) tupple.
21
21
*
22
- * Will try to parse FOV from string if $operator is null.
22
+ * Will try to parse FVO from string if $operator is null.
23
23
*
24
- * @param ?string $field single name (no .) of a field existing the the table. Will try to parse FOV from string if $operator is null.
25
- * @param mixed $value to test field against. Must be string for LIKE operators and an array for IN operators.
24
+ * @param ?string $field single name (no .) of a field existing the the table. Will try to parse FVO from string if $operator is null.
25
+ * @param mixed $value to test field against. Must be string for LIKE operators and an array for IN operators.
26
26
* @param \PHPFUI\ORM\Operator $operator comparision of your choice
27
27
*/
28
28
public function __construct (?string $ field = null , mixed $ value = null , \PHPFUI \ORM \Operator $ operator = new \PHPFUI \ORM \Operator \Equal ())
@@ -90,23 +90,23 @@ public function __toString() : string
90
90
}
91
91
92
92
/**
93
- * Add logical AND between FOV tupples or Condition
93
+ * Add logical AND between FVO tupples or Condition
94
94
*/
95
95
public function and (string | \PHPFUI \ORM \Condition $ condition , mixed $ value = null , \PHPFUI \ORM \Operator $ operator = new \PHPFUI \ORM \Operator \Equal ()) : self
96
96
{
97
97
return $ this ->add ('AND ' , $ condition , $ operator , $ value );
98
98
}
99
99
100
100
/**
101
- * Add logical AND NOT between FOV tupples or Condition
101
+ * Add logical AND NOT between FVO tupples or Condition
102
102
*/
103
103
public function andNot (string | \PHPFUI \ORM \Condition $ condition , mixed $ value = null , \PHPFUI \ORM \Operator $ operator = new \PHPFUI \ORM \Operator \Equal ()) : self
104
104
{
105
105
return $ this ->add ('AND NOT ' , $ condition , $ operator , $ value );
106
106
}
107
107
108
108
/**
109
- * @return int the number of FOV tupples in the condition
109
+ * @return int the number of FVO tupples in the condition
110
110
*/
111
111
public function count () : int
112
112
{
@@ -116,7 +116,7 @@ public function count() : int
116
116
/**
117
117
* @return string[] of all the fields used by the condition
118
118
*/
119
- public function getFields (? self $ condition = null ) : array
119
+ public function getFields () : array
120
120
{
121
121
$ retVal = [];
122
122
@@ -182,15 +182,15 @@ public function getJSON() : string
182
182
}
183
183
184
184
/**
185
- * Add logical OR between FOV tupples or Condition
185
+ * Add logical OR between FVO tupples or Condition
186
186
*/
187
187
public function or (string | \PHPFUI \ORM \Condition $ condition , mixed $ value = null , \PHPFUI \ORM \Operator $ operator = new \PHPFUI \ORM \Operator \Equal ()) : self
188
188
{
189
189
return $ this ->add ('OR ' , $ condition , $ operator , $ value );
190
190
}
191
191
192
192
/**
193
- * Add logical OR NOT between FOV tupples or Condition
193
+ * Add logical OR NOT between FVO tupples or Condition
194
194
*/
195
195
public function orNot (string | \PHPFUI \ORM \Condition $ condition , mixed $ value = null , \PHPFUI \ORM \Operator $ operator = new \PHPFUI \ORM \Operator \Equal ()) : self
196
196
{
0 commit comments