CriterionVisitor
        CriterionVisitor.php
                :
        16
                
    
                                        Abstract
        
        
        
                Visits the criterion tree into a Solr query.
Methods¶
                
canVisit()
            ¶
    
        
        CriterionVisitor.php
                :
        21
                
    
        CHeck if visitor is applicable to current criterion.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $criterion | CriterionInterface | - | - | 
                
visit()
            ¶
    
        
        CriterionVisitor.php
                :
        26
                
    
        Map field value to a proper Solr representation.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $criterion | CriterionInterface | - | - | 
| $subVisitor | self|null | null | - | 
                
escapeExpressions()
            ¶
    
        
        CriterionVisitor.php
                :
        110
                
    
        Escapes value for use in expressions.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $string | string | - | - | 
| $allowWildcard | bool | false | 
                                                         Allow "*" in expression.  | 
                
Return values
string|null
                
escapeQuote()
            ¶
    
        
        CriterionVisitor.php
                :
        98
                
    
        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
                :
        40
                
    
        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 | string | - | - | 
| $start | mixed | - | - | 
| $end | mixed | - | - | 
Return values
string
                
toString()
            ¶
    
        
        CriterionVisitor.php
                :
        84
                
    
        Converts given $value to the appropriate Solr string representation.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $value | mixed | - | - | 
Return values
string