CriterionVisitor
CriterionVisitor.php
:
15
Visits the criterion tree into a Solr query.
Methods¶
canVisit() ¶
CriterionVisitor.php
:
22
CHeck if visitor is applicable to current criterion.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$criterion | Criterion | - | - |
Return values
bool
visit() ¶
CriterionVisitor.php
:
31
Map field value to a proper Solr representation.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$criterion | Criterion | - | - |
$subVisitor | CriterionVisitor | null | - |
Return values
string
escapeExpressions() ¶
CriterionVisitor.php
:
137
Escapes value for use in expressions.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$string | string | - | - |
$allowWildcard | bool | false |
Allow "*" in expression. |
escapeQuote() ¶
CriterionVisitor.php
:
122
Escapes given $string for wrapping inside single or double quotes.
|
|
Does not include quotes in the returned string, this needs to be done by the consumer code.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$string | string | - | - |
$doubleQuote | bool | false | - |
Return values
string
getRange() ¶
CriterionVisitor.php
:
51
Get Solr range.
|
|
Start and end are optional, depending on the respective operator. Pass null in this case. The operator may be one of:
- case Operator::GT:
- case Operator::GTE:
- case Operator::LT:
- case Operator::LTE:
- case Operator::BETWEEN:
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$operator | mixed | - | - |
$start | mixed | - | - |
$end | mixed | - | - |
Return values
string
toString() ¶
CriterionVisitor.php
:
99
Converts given $value to the appropriate Solr string representation.
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$value | mixed | - | - |
Return values
string