$snippetCallback public property
PHP callback, which should be used to fetch source data for the snippets. Such callback will receive array of query result rows as an argument and must return the array of snippet source strings in the order, which match one of incoming rows. For example:
$query = new Query(); $query->from('idx_item') ->match('pencil') ->snippetCallback(function ($rows) { $result = []; foreach ($rows as $row) { $result[] = file_get_contents('/path/to/index/files/' . $row['id'] . '.txt'); } return $result; }) ->all();
public callable $snippetCallback = null
Please login to continue.