yii\sphinx\QueryBuilder::buildWhere PHP Метод

buildWhere() публичный Метод

public buildWhere ( string[] $indexes, string | array $condition, array &$params, string | yii\db\Expression | null $match = null ) : string
$indexes string[] list of index names, which affected by query
$condition string | array
$params array the binding parameters to be populated
$match string | yii\db\Expression | null
Результат string the WHERE clause built from [[query]].
    public function buildWhere($indexes, $condition, &$params, $match = null)
    {
        if ($match !== null) {
            $matchWhere = 'MATCH(' . $this->buildMatch($match, $params) . ')';
            if ($condition === null) {
                $condition = $matchWhere;
            } else {
                $condition = ['and', $matchWhere, $condition];
            }
        }
        if (empty($condition)) {
            return '';
        }
        $indexSchemas = $this->getIndexSchemas($indexes);
        $where = $this->buildCondition($indexSchemas, $condition, $params);
        return $where === '' ? '' : 'WHERE ' . $where;
    }