Wrapper method for MongoCursor::limit().

@see http://php.net/manual/en/mongocursor.limit.php
@param integer $num
@return $this
431804
public function limit($num)
    {
        $num = (integer) $num;
        $this->limit = $num;
        $this->mongoCursor->limit($num);
        return $this;
    }
668281
public function limit(int $limit = 0): Update
    {
        if (!\is_int($limit) || $limit <= 0) {
            throw new InvalidArgumentException('$limit have to be a positive integer');
        }
        $this->limit = $limit;
        return $this;
    }
407278
public function limit($count)
    {
        if($count<1 || $count>50){
            throw new \RuntimeException('Limit beyond 1-50 range', ResourceException::LIMIT_BEYOND_RANGE);
        }

        $this->limit = $count;

        return $this;
    }
802780
public function setNum($num)
    {
        $this->num = $num;
        foreach ($this->positions as $position) {
            $position->generated->line = $num;
        }
    }
61130
public function skip($num)
    {
        $num = (integer) $num;
        $this->skip = $num;
        $this->riakCursor->skip($num);
        return $this;
    }
439276
public function limit($x = 99999)
		{
			if ($x !== null and is_numeric($x) and $x >= 1) {
				$this->limit = (int) $x;
			}

			return $this;
		}
88542
final public function limit($limit, $offset = 0)
    {
        $this->_sql['limit'] = $limit;
        $this->offset($offset);
        return $this;
    }
411143
public function setLimit($limit)
    {
        $this->limit = (int)$limit;

        if ($this->total > 0 && $this->limit > 0) {
            $this->setPages(ceil($this->total / $limit));
        }

        return $this;
    }
718147
public function setLimit($limit)
    {
        if ($limit < 1 || !is_int($limit)) {
            throw new \InvalidArgumentException('setLimit() accepts only integers greater 0.', 1263387249);
        }
        $this->limit = $limit;

        return $this;
    }
219918
public function limit($limit, $offset = null)
    {
        if ($offset !== null) {
            $this->builder->setFirstResult((int) $offset);
        }

        $this->builder->setMaxResults((int) $limit);

        return $this;
    }
167734
public function paginate($limit = 25, $page = 0)
    {
        if ($limit > 0) {
            $this->queryBuilder->setMaxResults($limit);
        }

        if ($page > 0) {
            $this->queryBuilder->setFirstResult($page * $limit);
        }

        return $this;
    }
711221
public function batchSize($num)
    {
        $this->batchSize = (integer) $num;
        $this->mongoCommandCursor->batchSize($num);

        return $this;
    }
664008
public function take($limit)
    {
        if (is_null($this->limit)) {
            $this->limit = (int) $limit;

            return $this;
        }

        if (preg_match('/^([\d]+),\s$/', $this->limit, $match)) {
            $this->limit = end($match).', '.$limit;
        }

        return $this;
    }
926470
public function limit($limit, $offset = '')
    {
        if (is_null($limit)) {
            throw new \Exception('Empty parameter given to limit clause ');
        }

        if (empty($offset) && !empty($limit)) {
            $this->limitValue = 0;
            $this->offsetValue = intval($limit);
        } else {
            $this->limitValue = intval($limit);
            $this->offsetValue = intval($offset);
        }

        return $this;
    }
288461
public function batchSize($num)
    {
        $num = (integer) $num;
        $this->batchSize = $num;
        $this->riakCursor->batchSize($num);
        return $this;
    }
972974
public function limit($limit, $start = null)
    {
        if(is_int($limit)) {
            $build = $limit;
            if(is_int($start)) {
                $build = $start.', '.$limit;
            }
            $this->limit = ' LIMIT '.$build;
        }
        return $this;
    }
1169674
public function setNumber($num)
    {
        $num = (int) $num;
        if ($num <= 0) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid Number "%s" - Polygon Coordinates Number Must Be '
                    . 'Greater Than Zero'
                    , $num
            ));
        }
        $count = count($this->getCoordinates());
        if ($num > $count) {
            throw new \OutOfBoundsException(sprintf(
                    'Given Coodrinates Number "%s" Is Greater Than The Actual '
                    . 'Coordinates Array Size "%s"'
                    , $num, $count
            ));
        }
        $this->count = $num;

        return $this;
    }