mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-03 14:52:13 +02:00
Split API classes and interfaces
This commit is contained in:
47
docs/api/MongoDB/Query/QueryCursor.php
Normal file
47
docs/api/MongoDB/Query/QueryCursor.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user