Mongolid\Cursor\EmbeddedCursor::limit PHP Method

limit() public method

Limits the number of results returned.
public limit ( integer $amount ) : EmbeddedCursor
$amount integer The number of results to return.
return EmbeddedCursor Returns this cursor.
    public function limit(int $amount)
    {
        $this->items = array_slice($this->items, 0, $amount);
        return $this;
    }