diff --git a/docs/api/MongoDB/Command/CommandCursor.php b/docs/api/MongoDB/Command/CommandCursor.php index 17364580a..162707dfb 100644 --- a/docs/api/MongoDB/Command/CommandCursor.php +++ b/docs/api/MongoDB/Command/CommandCursor.php @@ -4,6 +4,7 @@ use MongoDB\Cursor; use MongoDB\CursorId; +use Mongodb\Server; /** * Cursor implementation that may be constructed from values found in a @@ -34,10 +35,8 @@ public function __construct(Server $server, CursorId $cursorId, array $firstBatc $this->firstBatch = $firstBatch; } - // Iterator methods... - /** - * @return Cursor::getId() + * @return CursorId */ public function getId() { @@ -45,7 +44,7 @@ public function getId() } /** - * @see Cursor::getServer() + * @return Server Server from which the cursor originated */ public function getServer() { @@ -53,7 +52,7 @@ public function getServer() } /** - * @see Cursor::isDead() + * @return boolean Whether the cursor is exhausted and has no more results */ public function isDead() { @@ -61,10 +60,17 @@ public function isDead() } /** - * @see \MongoDB\Cursor::setBatchSize() + * @param integer $batchSize */ public function setBatchSize($batchSize) { $this->batchSize = (integer) $batchSize; } + + /* Cursor is an iterator */ + public function current() {} + public function next() {} + public function key() {} + public function valid() {} + public function rewind() {} } diff --git a/docs/api/MongoDB/CursorId.php b/docs/api/MongoDB/CursorId.php index ed1e79fa6..ed34524fc 100644 --- a/docs/api/MongoDB/CursorId.php +++ b/docs/api/MongoDB/CursorId.php @@ -13,7 +13,7 @@ final class CursorId // $id is an internal uint64_t value instead of a class property /** - * @param integer|string $id + * @param string $id */ public function __construct($id) { diff --git a/docs/api/MongoDB/Manager.php b/docs/api/MongoDB/Manager.php index 2494d31da..7dde1f933 100644 --- a/docs/api/MongoDB/Manager.php +++ b/docs/api/MongoDB/Manager.php @@ -25,6 +25,8 @@ final class Manager { /** + * Constructs a new Manager + * * @param string $uri Connection URI * @param array $options Connection options (e.g. auth, socket timeouts) * @param array $driverOptions Driver options (e.g. stream contexts) @@ -35,6 +37,8 @@ public function __construct($uri, array $options = array(), array $driverOptions } /** + * Creates new Manager from a list of servers + * * @param Server[] $servers * @return Manager */ @@ -50,6 +54,8 @@ static public function createFromServers(array $servers) } /** + * Execute a command + * * @param string $db * @param Command $command * @param ReadPreference $readPreference @@ -72,6 +78,8 @@ public function executeCommand($db, Command $command, ReadPreference $readPrefer } /** + * Execute a Query + * * @param string $namespace * @param Query $query * @param ReadPreference $readPreference @@ -92,6 +100,8 @@ public function executeQuery($namespace, Query $query, ReadPreference $readPrefe } /** + * Executes a write operation batch (e.g. insert, update, delete) + * * @param string $namespace * @param WriteBatch $batch * @param array $writeOptions Ordering and write concern options (default: {"ordered": true, "w": 1}) diff --git a/docs/api/MongoDB/Query/Query.php b/docs/api/MongoDB/Query/Query.php index cfda9704a..bf84503b0 100644 --- a/docs/api/MongoDB/Query/Query.php +++ b/docs/api/MongoDB/Query/Query.php @@ -31,8 +31,8 @@ final class Query * @param array|object $query Query document * @param array|object $selector Selector document * @param integer $flags Query flags - * @param integer $limit Limit * @param integer $skip Skip + * @param integer $limit Limit */ public function __construct($query, $selector, $flags, $skip, $limit) { diff --git a/docs/api/MongoDB/Query/QueryCursor.php b/docs/api/MongoDB/Query/QueryCursor.php index a06ece593..55880f109 100644 --- a/docs/api/MongoDB/Query/QueryCursor.php +++ b/docs/api/MongoDB/Query/QueryCursor.php @@ -4,6 +4,7 @@ use MongoDB\Cursor; use MongoDB\CursorId; +use Mongodb\Server; /** * Cursor implementation that is returned after executing a Query. @@ -21,6 +22,8 @@ final class QueryCursor implements Cursor private $cursorId; /** + * Construct a new QueryCursor + * * @param Server $server * @param CursorId $cursorId */ @@ -30,10 +33,8 @@ public function __construct(Server $server, CursorId $cursorId) $this->cursorId = $cursorId; } - // Iterator methods... - /** - * @see Cursor::getId() + * @return CursorId */ public function getId() { @@ -41,7 +42,7 @@ public function getId() } /** - * @see Cursor::getServer() + * @return Server Server from which the cursor originated */ public function getServer() { @@ -49,7 +50,7 @@ public function getServer() } /** - * @see Cursor::isDead() + * @return boolean Whether the cursor is exhausted and has no more results */ public function isDead() { @@ -57,10 +58,17 @@ public function isDead() } /** - * @see Cursor::setBatchSize() + * @param integer $batchSize */ public function setBatchSize($batchSize) { $this->batchSize = (integer) $batchSize; } + + /* Cursor is an iterator */ + public function current() {} + public function next() {} + public function key() {} + public function valid() {} + public function rewind() {} } diff --git a/docs/api/MongoDB/Write/DeleteBatch.php b/docs/api/MongoDB/Write/DeleteBatch.php index 177145b7b..ca9e8af2b 100644 --- a/docs/api/MongoDB/Write/DeleteBatch.php +++ b/docs/api/MongoDB/Write/DeleteBatch.php @@ -10,7 +10,7 @@ final class DeleteBatch implements WriteBatch private $documents; /** - * @see WriteBatch::add() + * @param array|object $document Operation/document to add to the batch */ public function add($document) { diff --git a/docs/api/MongoDB/Write/InsertBatch.php b/docs/api/MongoDB/Write/InsertBatch.php index a811008e5..973f8d7e9 100644 --- a/docs/api/MongoDB/Write/InsertBatch.php +++ b/docs/api/MongoDB/Write/InsertBatch.php @@ -10,7 +10,7 @@ final class InsertBatch implements WriteBatch private $documents; /** - * @see WriteBatch::add() + * @param array|object $document Operation/document to add to the batch */ public function add($document) { diff --git a/docs/api/MongoDB/Write/UpdateBatch.php b/docs/api/MongoDB/Write/UpdateBatch.php index 8201c9f3a..172b81890 100644 --- a/docs/api/MongoDB/Write/UpdateBatch.php +++ b/docs/api/MongoDB/Write/UpdateBatch.php @@ -10,7 +10,7 @@ final class UpdateBatch implements WriteBatch private $documents; /** - * @see WriteBatch::add() + * @param array|object $document Operation/document to add to the batch */ public function add($document) { diff --git a/docs/bootstrap.php b/docs/bootstrap.php new file mode 100644 index 000000000..60f4ec86c --- /dev/null +++ b/docs/bootstrap.php @@ -0,0 +1,22 @@ +