Skip to content

Commit 2d2f443

Browse files
committed
Merge pull request #380
2 parents c6c000b + 1cf6add commit 2d2f443

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+169
-144
lines changed

docs/reference/bson.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ database, and reads it back as an object of the same type:
138138

139139
<?php
140140

141-
$collection = (new MongoDB\Client)->demo->persons;
141+
$collection = (new MongoDB\Client)->test->persons;
142142

143143
$result = $collection->insertOne(new Person('Bob'));
144144

@@ -219,7 +219,7 @@ everything as a PHP array:
219219
]
220220
);
221221

222-
$document = $client->demo->zips->findOne(['_id' => '94301']);
222+
$document = $client->test->zips->findOne(['_id' => '94301']);
223223

224224
var_dump($document);
225225

docs/reference/method/MongoDBClient-dropDatabase.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ Errors/Exceptions
4646
Example
4747
-------
4848

49-
The following example drops the ``demo`` database:
49+
The following example drops the ``test`` database:
5050

5151
.. code-block:: php
5252

5353
<?php
5454

5555
$client = new MongoDB\Client;
5656

57-
$result = $client->dropDatabase('demo');
57+
$result = $client->dropDatabase('test');
5858

5959
var_dump($result);
6060

@@ -64,7 +64,7 @@ The output would then resemble::
6464
["storage":"ArrayObject":private]=>
6565
array(2) {
6666
["dropped"]=>
67-
string(4) "demo"
67+
string(4) "test"
6868
["ok"]=>
6969
float(1)
7070
}

docs/reference/method/MongoDBClient-selectCollection.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ overridden via the ``$options`` parameter.
4949
Example
5050
-------
5151

52-
The following example selects the ``users`` collection in the ``demo`` database:
52+
The following example selects the ``users`` collection in the ``test`` database:
5353

5454
.. code-block:: php
5555

5656
<?php
5757

5858
$client = new MongoDB\Client;
5959

60-
$collection = $client->selectCollection('demo', 'users');
60+
$collection = $client->selectCollection('test', 'users');
6161

62-
The following example selects the ``users`` collection in the ``demo`` database
62+
The following example selects the ``users`` collection in the ``test`` database
6363
with a custom read preference:
6464

6565
.. code-block:: php
@@ -69,7 +69,7 @@ with a custom read preference:
6969
$client = new MongoDB\Client;
7070

7171
$collection = $client->selectCollection(
72-
'demo',
72+
'test',
7373
'users',
7474
[
7575
'readPreference' => new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY),

docs/reference/method/MongoDBClient-selectDatabase.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ via the ``$options`` parameter.
4949
Example
5050
-------
5151

52-
The following example selects the ``demo`` database:
52+
The following example selects the ``test`` database:
5353

5454
.. code-block:: php
5555

5656
<?php
5757

5858
$client = new MongoDB\Client;
5959

60-
$db = $client->selectDatabase('demo');
60+
$db = $client->selectDatabase('test');
6161

62-
The following examples selects the ``demo`` database with a custom read
62+
The following examples selects the ``test`` database with a custom read
6363
preference:
6464

6565
.. code-block:: php
@@ -69,7 +69,7 @@ preference:
6969
$client = new MongoDB\Client;
7070

7171
$db = $client->selectDatabase(
72-
'demo',
72+
'test',
7373
[
7474
'readPreference' => new MongoDB\Driver\ReadPreference(MongoDB\Driver\ReadPreference::RP_SECONDARY),
7575
]

docs/reference/method/MongoDBClient__get.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ any options, use the :phpmethod:`MongoDB\\Client::selectDatabase` method.
5050
Examples
5151
--------
5252

53-
The following example selects the ``demo`` and ``another-app`` databases:
53+
The following example selects the ``test`` and ``another-app`` databases:
5454

5555
.. code-block:: php
5656

5757
<?php
5858

5959
$client = new MongoDB\Client;
6060

61-
$demo = $client->demo;
61+
$test = $client->test;
6262
$anotherApp = $client->{'another-app'};
6363

6464
See Also

docs/reference/method/MongoDBCollection-createIndex.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Create a Compound Index
5454

5555
The following example creates a :manual:`compound index </core/index-compound>`
5656
on the ``borough`` and ``cuisine`` fields in the ``restaurants`` collection in
57-
the ``example`` database.
57+
the ``test`` database.
5858

5959
.. code-block:: php
6060

6161
<?php
6262

63-
$collection = (new MongoDB\Client)->selectCollection('example', 'restaurants');
63+
$collection = (new MongoDB\Client)->selectCollection('test', 'restaurants');
6464

6565
$indexName = $collection->createIndex(['borough' => 1, 'cuisine' => 1]);
6666

@@ -74,15 +74,15 @@ Create a Partial Index
7474
~~~~~~~~~~~~~~~~~~~~~~
7575

7676
The following example adds a :manual:`partial index </core/index-parital>` on
77-
the ``borough`` field in the ``restaurants`` collection in the ``example``
77+
the ``borough`` field in the ``restaurants`` collection in the ``test``
7878
database. The partial index indexes only documents where the ``borough`` field
7979
exists.
8080

8181
.. code-block:: php
8282

8383
<?php
8484

85-
$collection = (new MongoDB\Client)->selectCollection('example, 'restaurants');
85+
$collection = (new MongoDB\Client)->selectCollection('test, 'restaurants');
8686

8787
$indexName = $collection->createIndex(
8888
['borough' => 1],

docs/reference/method/MongoDBCollection-createIndexes.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ Example
6464
-------
6565

6666
The following example creates two indexes on the ``restaurants`` collection in
67-
the ``example`` database. One index is a compound index on the ``borough`` and
67+
the ``test`` database. One index is a compound index on the ``borough`` and
6868
``cuisine`` fields and the other is 2dsphere index on the ``loc`` field with a
6969
custom name.
7070

7171
.. code-block:: php
7272

7373
<?php
7474

75-
$collection = (new MongoDB\Client)->selectCollection('example', 'restaurants');
75+
$collection = (new MongoDB\Client)->selectCollection('test', 'restaurants');
7676

7777
$indexNames = $collection->createIndexes([
7878
[ 'key' => [ 'borough' => 1, 'cuisine' => 1] ],

docs/reference/method/MongoDBCollection-deleteMany.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ that have ``"ny"`` as the value for the ``state`` field:
5959

6060
<?php
6161

62-
$collection = (new MongoDB\Client)->demo->users;
62+
$collection = (new MongoDB\Client)->test->users;
6363
$collection->drop();
6464

6565
$collection->insertOne(['name' => 'Bob', 'state' => 'ny']);

docs/reference/method/MongoDBCollection-deleteOne.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ has ``"ny"`` as the value for the ``state`` field:
6161

6262
<?php
6363

64-
$collection = (new MongoDB\Client)->demo->users;
64+
$collection = (new MongoDB\Client)->test->users;
6565
$collection->drop();
6666

6767
$collection->insertOne(['name' => 'Bob', 'state' => 'ny']);

docs/reference/method/MongoDBCollection-distinct.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ Return Distinct Values for a Field
5454
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5555

5656
The following example identifies the distinct values for the ``borough`` field
57-
in the ``restaurants`` collection in the ``example`` database.
57+
in the ``restaurants`` collection in the ``test`` database.
5858

5959
.. code-block:: php
6060

6161
<?php
6262

63-
$collection = (new MongoDB\Client)->example->restaurants;
63+
$collection = (new MongoDB\Client)->test->restaurants;
6464

6565
$distinct = $collection->distinct('borough');
6666

@@ -87,14 +87,14 @@ Return Distinct Values Using a Filter
8787
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8888

8989
The following example identifies the distinct values for the ``cuisine`` field
90-
in the ``restaurants`` collection in the ``example`` database for documents
91-
where the ``borough`` is ``Queens``:
90+
in the ``restaurants`` collection in the ``test`` database for documents where
91+
the ``borough`` is ``Queens``:
9292

9393
.. code-block:: php
9494

9595
<?php
9696

97-
$collection = (new MongoDB\Client)->example->restaurants;
97+
$collection = (new MongoDB\Client)->test->restaurants;
9898

9999
$distinct = $collection->distinct('cuisine', ['borough' => 'Queens']);
100100

0 commit comments

Comments
 (0)