PHP 클래스 Flarum\Core\Search\AbstractSearch

파일 보기 프로젝트 열기: flarum/core 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$activeGambits Flarum\Core\Search\GambitInterface[]
$actor Flarum\Core\User
$defaultSort array
$query Illuminate\Database\Query\Builder

공개 메소드들

메소드 설명
__construct ( Builder $query, User $actor )
addActiveGambit ( Flarum\Core\Search\GambitInterface $gambit ) : void Add a gambit as being active in this search.
getActiveGambits ( ) : Flarum\Core\Search\GambitInterface[] Get a list of the gambits that are active in this search.
getActor ( ) : User Get the user who is performing the search.
getDefaultSort ( ) : array Get the default sort order for the search.
getQuery ( ) : Builder Get the query builder for the search results query.
setDefaultSort ( array $defaultSort ) : mixed 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.

메소드 상세

__construct() 공개 메소드

public __construct ( Builder $query, User $actor )
$query Illuminate\Database\Query\Builder
$actor Flarum\Core\User

addActiveGambit() 공개 메소드

Add a gambit as being active in this search.
public addActiveGambit ( Flarum\Core\Search\GambitInterface $gambit ) : void
$gambit Flarum\Core\Search\GambitInterface
리턴 void

getActiveGambits() 공개 메소드

Get a list of the gambits that are active in this search.
public getActiveGambits ( ) : Flarum\Core\Search\GambitInterface[]
리턴 Flarum\Core\Search\GambitInterface[]

getActor() 공개 메소드

Get the user who is performing the search.
public getActor ( ) : User
리턴 Flarum\Core\User

getDefaultSort() 공개 메소드

Get the default sort order for the search.
public getDefaultSort ( ) : array
리턴 array

getQuery() 공개 메소드

Get the query builder for the search results query.
public getQuery ( ) : Builder
리턴 Illuminate\Database\Query\Builder

setDefaultSort() 공개 메소드

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.
public setDefaultSort ( array $defaultSort ) : mixed
$defaultSort array An array of sort-order pairs, where the column is the key, and the order is the value. The order may be 'asc', 'desc', or an array of IDs to order by.
리턴 mixed

프로퍼티 상세

$activeGambits 보호되어 있는 프로퍼티

protected GambitInterface[],Flarum\Core\Search $activeGambits
리턴 Flarum\Core\Search\GambitInterface[]

$actor 보호되어 있는 프로퍼티

protected User,Flarum\Core $actor
리턴 Flarum\Core\User

$defaultSort 보호되어 있는 프로퍼티

protected array $defaultSort
리턴 array

$query 보호되어 있는 프로퍼티

protected Builder,Illuminate\Database\Query $query
리턴 Illuminate\Database\Query\Builder