class SimpleFlarumSearch implements ExtenderInterface

Methods

__construct(string $searcherClass)

No description

addGambit(string $gambitClass)

<p>Add a gambit to this searcher. Gambits are used to filter search queries.</p>

setFullTextGambit(string $gambitClass)

<p>Set the full text gambit for this searcher. The full text gambit actually executes the search.</p>

addSearchMutator(callable|string $callback)

<p>Add a callback through which to run all search queries after gambits have been applied.</p>

extend(Container $container, Extension $extension = null)

No description

Details

__construct(string $searcherClass)

Parameters

string $searcherClass

SimpleFlarumSearch addGambit(string $gambitClass)

<p>Add a gambit to this searcher. Gambits are used to filter search queries.</p>

Parameters

string $gambitClass

Return Value

SimpleFlarumSearch

SimpleFlarumSearch setFullTextGambit(string $gambitClass)

<p>Set the full text gambit for this searcher. The full text gambit actually executes the search.</p>

Parameters

string $gambitClass

Return Value

SimpleFlarumSearch

SimpleFlarumSearch addSearchMutator(callable|string $callback)

<p>Add a callback through which to run all search queries after gambits have been applied.</p>

Parameters

callable|string $callback <p>The callback can be a closure or an invokable class, and should accept:</p> <ul> <li>\Flarum\Search\SearchState $search</li> <li>\Flarum\Query\QueryCriteria $criteria</li> </ul> <p>The callback should return void.</p>

Return Value

SimpleFlarumSearch

extend(Container $container, Extension $extension = null)

Parameters

Container $container
Extension $extension