yii\sphinx\ActiveRecord::callSnippets PHP Метод

callSnippets() публичный статический Метод

Builds a snippet from provided data and query, using specified index settings.
public static callSnippets ( string | array $source, string $match, array $options = [] ) : string | array
$source string | array is the source data to extract a snippet from. It could be either a single string or array of strings.
$match string the full-text query to build snippets for.
$options array list of options in format: optionName => optionValue
Результат string | array built snippet in case "source" is a string, list of built snippets in case "source" is an array.
    public static function callSnippets($source, $match, $options = [])
    {
        $command = static::getDb()->createCommand();
        $command->callSnippets(static::indexName(), $source, $match, $options);
        if (is_array($source)) {
            return $command->queryColumn();
        } else {
            return $command->queryScalar();
        }
    }