yii\sphinx\ActiveQuery::fetchSnippetSourceFromModels PHP Method

fetchSnippetSourceFromModels() protected method

Fetches the source for the snippets using [[ActiveRecord::getSnippetSource()]] method.
protected fetchSnippetSourceFromModels ( ActiveRecord[] $models ) : array
$models ActiveRecord[] raw query result rows.
return array snippet source strings
    protected function fetchSnippetSourceFromModels($models)
    {
        if ($this->asArray) {
            throw new InvalidCallException('"' . __METHOD__ . '" unable to determine snippet source from plain array. Either disable "asArray" option or use regular "snippetCallback"');
        }
        $result = [];
        foreach ($models as $model) {
            $result[] = $model->getSnippetSource();
        }
        return $result;
    }