class DiscussionSearch extends AbstractSearch
An object which represents the internal state of a search for discussions: the search query, the user performing the search, the fallback sort order, relevant post information, and a log of which gambits have been used.
Properties
protected Builder | $query | from AbstractSearch |
|
|
protected User | $actor | from AbstractSearch |
|
|
protected | $defaultSort | {@inheritdoc} |
|
|
protected GambitInterface[] | $activeGambits | from AbstractSearch |
|
|
protected array | $relevantPostIds |
|
Methods
Set the default sort order for the search. This will only be applied if a sort order has not been specified in the search criteria.
Get a list of the gambits that are active in this search.
Details
in AbstractSearch
at
line 46
__construct(Builder $query, User $actor)
in AbstractSearch
at
line 57
Builder
getQuery()
Get the query builder for the search results query.
in AbstractSearch
at
line 67
User
getActor()
Get the user who is performing the search.
in AbstractSearch
at
line 77
array
getDefaultSort()
Get the default sort order for the search.
in AbstractSearch
at
line 91
mixed
setDefaultSort(mixed $defaultSort)
Set the default sort order for the search. This will only be applied if a sort order has not been specified in the search criteria.
in AbstractSearch
at
line 101
GambitInterface[]
getActiveGambits()
Get a list of the gambits that are active in this search.
in AbstractSearch
at
line 112
void
addActiveGambit(GambitInterface $gambit)
Add a gambit as being active in this search.
at
line 36
int[]
getRelevantPostIds()
Get the related IDs for each result.
at
line 47
void
setRelevantPostIds(array $relevantPostIds)
Set the relevant post IDs for the results.