whereIn() public method

Selects the documents where the value of a field equals any value in the specified array.
public whereIn ( string $field, array $values ) : Expression
$field string
$values array
return Expression
Example #1
0
 /**
  * Filter by list of \MongoId
  *
  * @param array $idList list of ids
  * @return \Sokil\Mongo\Cursor
  */
 public function byIdList(array $idList)
 {
     $this->expression->whereIn('_id', self::mixedToMongoIdList($idList));
     return $this;
 }