PHP Class Flarum\Core\Search\Discussion\DiscussionSearcher

Inheritance: use trait Flarum\Core\Search\ApplySearchParametersTrait
Exibir arquivo Open project: flarum/core Class Usage Examples

Protected Properties

Property Type Description
$discussions Flarum\Core\Repository\DiscussionRepository
$gambits Flarum\Core\Search\GambitManager
$posts Flarum\Core\Repository\PostRepository

Public Methods

Method Description
__construct ( GambitManager $gambits, DiscussionRepository $discussions, PostRepository $posts )
search ( SearchCriteria $criteria, integer | null $limit = null, integer $offset, array $load = [] ) : SearchResults

Protected Methods

Method Description
loadRelevantPosts ( Illuminate\Database\Eloquent\Collection $discussions, DiscussionSearch $search ) Load relevant posts onto each discussion using information from the search.

Method Details

__construct() public method

public __construct ( GambitManager $gambits, DiscussionRepository $discussions, PostRepository $posts )
$gambits Flarum\Core\Search\GambitManager
$discussions Flarum\Core\Repository\DiscussionRepository
$posts Flarum\Core\Repository\PostRepository

loadRelevantPosts() protected method

Load relevant posts onto each discussion using information from the search.
protected loadRelevantPosts ( Illuminate\Database\Eloquent\Collection $discussions, DiscussionSearch $search )
$discussions Illuminate\Database\Eloquent\Collection
$search DiscussionSearch

Property Details

$discussions protected_oe property

protected DiscussionRepository,Flarum\Core\Repository $discussions
return Flarum\Core\Repository\DiscussionRepository

$gambits protected_oe property

protected GambitManager,Flarum\Core\Search $gambits
return Flarum\Core\Search\GambitManager

$posts protected_oe property

protected PostRepository,Flarum\Core\Repository $posts
return Flarum\Core\Repository\PostRepository