PHP 클래스 Bolt\Storage\Query\SearchQuery

@link https://docs.bolt.cm/content-search The resulting QueryBuilder object is then passed through to the individual field handlers where they can perform value transformations.
저자: Ross Riley ([email protected])
상속: extends SelectQuery, implements Bolt\Storage\Query\QueryInterface
파일 보기 프로젝트 열기: bolt/bolt

보호된 프로퍼티들

프로퍼티 타입 설명
$config SearchConfig
$search string

공개 메소드들

메소드 설명
__construct ( Doctrine\DBAL\Query\QueryBuilder $qb, QueryParameterParser $parser, SearchConfig $config ) Constructor.
getSearchWords ( ) : array Gets the individual elements of the search query as an array
getWhereExpression ( ) : CompositeExpression | null Creates a composite expression that adds all the attached filters individual expressions into a combined one.
setParameters ( array $params ) Sets the overall parameters on the query. This may include others than the search query itself which gets set to the 'filter' param.
setSearch ( string $search ) This method sets the search filter which then triggers the process method.

보호된 메소드들

메소드 설명
getSearchParameter ( ) : string This is an internal helper method to get the search words prepared to be passed to the expression builder.
processFilters ( ) This overrides the SelectQuery default to do some extra preparation for a search query.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Doctrine\DBAL\Query\QueryBuilder $qb, QueryParameterParser $parser, SearchConfig $config )
$qb Doctrine\DBAL\Query\QueryBuilder
$parser QueryParameterParser
$config SearchConfig

getSearchParameter() 보호된 메소드

This is an internal helper method to get the search words prepared to be passed to the expression builder.
protected getSearchParameter ( ) : string
리턴 string

getSearchWords() 공개 메소드

Gets the individual elements of the search query as an array
public getSearchWords ( ) : array
리턴 array

getWhereExpression() 공개 메소드

Creates a composite expression that adds all the attached filters individual expressions into a combined one.
public getWhereExpression ( ) : CompositeExpression | null
리턴 Doctrine\DBAL\Query\Expression\CompositeExpression | null

processFilters() 보호된 메소드

Firstly it builds separate filters for the search query and then it removes the filter from the params and the others will then get processed normally by the parent.
protected processFilters ( )

setParameters() 공개 메소드

Sets the overall parameters on the query. This may include others than the search query itself which gets set to the 'filter' param.
public setParameters ( array $params )
$params array

setSearch() 공개 메소드

This method sets the search filter which then triggers the process method.
public setSearch ( string $search )
$search string full search query

프로퍼티 상세

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

protected SearchConfig,Bolt\Storage\Query $config
리턴 SearchConfig