Skip to content

Commit aabf150

Browse files
authored
PHPLIB-654 Remove deprecated terminology (#828)
* Remove deprecated terminology * Update spec tests Updates spec tests to commit mongodb/specifications#6d7fd374ca14a80edabeefdd27cdd6187c43a0eb * Use ping instead of hello in docs
1 parent 0c7e297 commit aabf150

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

source/reference/method/MongoDBDatabase-command.txt

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ Errors/Exceptions
4343
Example
4444
-------
4545

46-
The following example executes an :manual:`isMaster
47-
</reference/command/isMaster>` command, which returns a cursor with a single
46+
The following example executes a :manual:`ping
47+
</reference/command/ping>` command, which returns a cursor with a single
4848
result document:
4949

5050
.. code-block:: php
@@ -53,32 +53,15 @@ result document:
5353

5454
$database = (new MongoDB\Client)->test;
5555

56-
$cursor = $database->command(['isMaster' => 1]);
56+
$cursor = $database->command(['ping' => 1]);
5757

5858
var_dump($c->toArray()[0]);
5959

6060
The output would resemble::
6161

6262
object(MongoDB\Model\BSONDocument)#11 (1) {
6363
["storage":"ArrayObject":private]=>
64-
array(8) {
65-
["ismaster"]=>
66-
bool(true)
67-
["maxBsonObjectSize"]=>
68-
int(16777216)
69-
["maxMessageSizeBytes"]=>
70-
int(48000000)
71-
["maxWriteBatchSize"]=>
72-
int(1000)
73-
["localTime"]=>
74-
object(MongoDB\BSON\UTCDateTime)#3 (1) {
75-
["milliseconds"]=>
76-
string(13) "1477608046464"
77-
}
78-
["maxWireVersion"]=>
79-
int(4)
80-
["minWireVersion"]=>
81-
int(0)
64+
array(1) {
8265
["ok"]=>
8366
float(1)
8467
}
@@ -94,7 +77,7 @@ multiple result documents:
9477

9578
$database = (new MongoDB\Client)->test;
9679

97-
$cursor = $database->command(['isMaster' => 1]);
80+
$cursor = $database->command(['listCollections' => 1]);
9881

9982
var_dump($c->toArray());
10083

0 commit comments

Comments
 (0)