Files
mongo-php-driver/docs/api/MongoDB/Query/QueryCursor.php
2014-06-12 03:19:17 -04:00

48 lines
924 B
PHP

<?php
namespace MongoDB\Query;
// Note: consider combining implementation with \MongoDB\Command\CommandCursor
final class QueryCursor implements \MongoDB\Cursor
{
private $server;
private $batchSize;
private $cursorId;
/**
* @param Server $server
* @param integer $cursorId
*/
public function __construct(Server $server, $cursorId)
{
$this->server = $server;
$this->cursorId = (integer) $cursorId;
}
// Iterator methods...
/**
* @see \MongoDB\Cursor::getId()
*/
public function getId()
{
return $this->cursorId;
}
/**
* @see \MongoDB\ServerResult::getServer()
*/
public function getServer()
{
return $this->server;
}
/**
* @see \MongoDB\Cursor::setBatchSize()
*/
public function setBatchSize($batchSize)
{
$this->batchSize = (integer) $batchSize;
}
}