Doctrine\MongoDB\Aggregation\Stage::sample PHP Method

sample() public method

Randomly selects the specified number of documents from its input.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/sample/
public sample ( integer $size ) : Doctrine\MongoDB\Aggregation\Stage\Sample
$size integer
return Doctrine\MongoDB\Aggregation\Stage\Sample
    public function sample($size)
    {
        return $this->builder->sample($size);
    }