MongoCursor::skip
MongoCursor::sort
MongoCursor
PHP Manual

# MongoCursor::softLimit

(PECL mongo >=0.9.0)

MongoCursor::softLimit — Limits the number of results initially returned

### Descripción

public MongoCursor MongoCursor::softLimit ( int `$num` )

### Lista de parámetros

`num`

  The number of results to return.

### Valores retornados

Returns this cursor.

### Errors/Exceptions

Throws MongoCursorException if this cursor has started iterating.

### Ejemplos

Example #1 MongoCursor::softLimit() and MongoCursor::limit() example

limit() and softLimit() are mutually exclusive, and whichever one comes last will "win":

`<?php
// 20 returned
$cursor1 = $collection->find()->softLimit(10)->limit(20);
// all documents returned, 10 sent to the client on initial request
$cursor2 = $collection->find()->limit(20)->softLimit(10);
?>`

MongoCursor::skip
MongoCursor::sort
MongoCursor
PHP Manual