Split API classes and interfaces

This commit is contained in:
Jeremy Mikola
2014-06-12 03:07:57 -04:00
parent 080dcb2d52
commit cd2d37ef38
25 changed files with 515 additions and 116 deletions

View File

@@ -0,0 +1,47 @@
<?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;
}
}