Skip to content

QueryParam

Type
Final Class
Namespace
craft\db
Inherits
craft\db\QueryParam
Since
5.0.0

Class QueryParam

View source

Public Properties

PropertyDescription
operatorstring – The logical operator that the values should be combined with (and, or, or not).
valuesstring[] – The param values.

operator

Type
string
Default value
self::OR

The logical operator that the values should be combined with (and, or, or not).

View source

values

Type
string[]
Default value
[]

The param values.

View source

Public Methods

MethodDescription
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.

View source

Arguments

Returns

string, null

parse()

Parses a given query param, separating it into an array of values and the logical operator (and, or, not).

View source

Arguments

  • $value (mixed)

Returns

self

toArray()

View source

Arguments

  • $value

Constants

ConstantDescription
AND
NOT
OR