PHP Class Elastica\Query\Ids

Author: Lee Parker
Author: Nicolas Ruflin ([email protected])
Author: Tim Rupp
Inheritance: extends AbstractQuery
显示文件 Open project: ruflin/elastica Class Usage Examples

Public Methods

Method Description
__construct ( string | Type $type = null, array $ids = [] ) Creates filter object.
addId ( string $id ) Adds one more filter to the and filter.
addType ( string | Type $type ) Adds one more type to query.
setIds ( array | string $ids ) Sets the ids to filter.
setType ( array | string | Type $type ) Set type.
toArray ( ) : array Converts filter to array.

Method Details

__construct() public method

Creates filter object.
public __construct ( string | Type $type = null, array $ids = [] )
$type string | Elastica\Type Type to filter on
$ids array List of ids

addId() public method

Adds one more filter to the and filter.
public addId ( string $id )
$id string Adds id to filter

addType() public method

Adds one more type to query.
public addType ( string | Type $type )
$type string | Elastica\Type Type name or object

setIds() public method

Sets the ids to filter.
public setIds ( array | string $ids )
$ids array | string List of ids

setType() public method

Set type.
public setType ( array | string | Type $type )
$type array | string | Elastica\Type Type name or object

toArray() public method

Converts filter to array.
See also: Elastica\Query\AbstractQuery::toArray()
public toArray ( ) : array
return array Query array