PHP Trait Wallmander\ElasticsearchIndexer\Model\Query\BuilderTrait

Author: Mikael Mattsson ([email protected])
ファイルを表示 Open project: wallmanderco/elasticsearch-indexer

Public Properties

Property Type Description
$isSingle boolean

Protected Properties

Property Type Description
$args array
$filterBuildingPoint null | object

Public Methods

Method Description
addSort ( $field, $order = 'asc' )
bool ( $callable, $relation = 'must' )
getArgs ( )
must ( $input )
setFrom ( $from )
setMinScore ( $score )
setQuery ( $query )
setSize ( $size )
setSort ( $field, $order = 'asc' )
should ( $input )
where ( string | array $arg1, string | array | null $arg2 = null, string | array | null $arg3 = null, boolean $not = false ) examples: where(['age' => 20, 'name' => 'John']) where('age', 20) where('age', [20, 21]) //warning: handled as ”in” where('age', 'in', [20, 21]) // 20 or 21 where('age', '=', [20, 21]) // exact match where('age', '==', [20, 21]) // same as above where('age', '!=', 20) where('age', 'exists', true) //warning: arg3 is needed or else it will check if age = 'exists'.
whereNot ( $arg1, $arg2 = null, $arg3 = null )

Protected Methods

Method Description
builderConstruct ( )

Method Details

addSort() public method

public addSort ( $field, $order = 'asc' )

bool() public method

public bool ( $callable, $relation = 'must' )

builderConstruct() protected method

protected builderConstruct ( )

getArgs() public method

public getArgs ( )

must() public method

public must ( $input )

setFrom() public method

public setFrom ( $from )

setMinScore() public method

public setMinScore ( $score )

setQuery() public method

public setQuery ( $query )

setSize() public method

public setSize ( $size )

setSort() public method

public setSort ( $field, $order = 'asc' )

should() public method

public should ( $input )

where() public method

examples: where(['age' => 20, 'name' => 'John']) where('age', 20) where('age', [20, 21]) //warning: handled as ”in” where('age', 'in', [20, 21]) // 20 or 21 where('age', '=', [20, 21]) // exact match where('age', '==', [20, 21]) // same as above where('age', '!=', 20) where('age', 'exists', true) //warning: arg3 is needed or else it will check if age = 'exists'.
public where ( string | array $arg1, string | array | null $arg2 = null, string | array | null $arg3 = null, boolean $not = false )
$arg1 string | array
$arg2 string | array | null
$arg3 string | array | null
$not boolean

whereNot() public method

public whereNot ( $arg1, $arg2 = null, $arg3 = null )

Property Details

$args protected_oe property

protected array $args
return array

$filterBuildingPoint protected_oe property

protected null|object $filterBuildingPoint
return null | object

$isSingle public_oe property

public bool $isSingle
return boolean