QueryParam ​
- Type
- Final Class
- Namespace
- craft\db
- Inherits
- craft\db\QueryParam
- Since
- 5.0.0
Class QueryParam
Public Properties ​
| Property | Description |
|---|---|
| operator | string – The logical operator that the values should be combined with (and, or, or not). |
| values | array – The param values. |
operator ​
- Type
- string
- Default value
self::OR
The logical operator that the values should be combined with (and, or, or not).
values ​
- Type
- array
- Default value
[]
The param values.
Public Methods ​
| Method | Description |
|---|---|
| extractOperator() | Extracts the logic operator (and, or, or not) from the beginning of an array. |
| parse() | Parses a given query param, separating it into an array of values and the logical operator (and, or, not). |
| toArray() |
extractOperator() ​
- Since
- 3.7.40
Extracts the logic operator (and, or, or not) from the beginning of an array.
Arguments ​
$values(array)
Returns ​
parse() ​
Parses a given query param, separating it into an array of values and the logical operator (and, or, not).
Arguments ​
$value(mixed)
Returns ​
self
toArray() ​
Arguments ​
$value
Constants ​
| Constant | Description |
|---|---|
AND | |
NOT | |
OR |