yii\sphinx\ActiveQuery::snippetByModel PHP Method

snippetByModel() public method

For example: php class Article extends ActiveRecord { public function getSnippetSource() { return file_get_contents('/path/to/source/files/' . $this->id . '.txt');; } } $articles = Article::find()->snippetByModel()->all(); Warning: this option should NOT be used with [[asArray]] at the same time!
public snippetByModel ( )
    public function snippetByModel()
    {
        $this->snippetCallback([$this, 'fetchSnippetSourceFromModels']);
        return $this;
    }