@@ -13,53 +13,53 @@ Definition
1313
1414.. phpmethod:: MongoDB\Client::getDatabase()
1515
16- Selects a database on the server. This method is an alias for
16+ Gets access to a database on the server. This method is an alias for
1717 :phpmethod:`MongoDB\Client::selectDatabase()` and will replace it in
1818 a future release.
1919
2020 .. code-block:: php
2121
22- function getDatabase(
23- string $databaseName,
24- array $options = []
25- ): MongoDB\Database
22+ function getDatabase(
23+ string $databaseName,
24+ array $options = []
25+ ): MongoDB\Database
2626
2727Parameters
2828----------
2929
3030``$databaseName`` : string
31- The name of the database to select .
31+ The name of the database to access .
3232
3333``$options`` : array
3434 An array specifying the desired options.
3535
3636 .. list-table::
37- :header-rows: 1
38- :widths: 20 20 80
37+ :header-rows: 1
38+ :widths: 20 20 80
3939
40- * - Name
41- - Type
42- - Description
40+ * - Name
41+ - Type
42+ - Description
4343
44- * - readConcern
45- - :php:`MongoDB\Driver\ReadConcern <class.mongodb-driver-readconcern>`
46- - The default read concern to use for database operations. Defaults to
47- the client's read concern.
44+ * - readConcern
45+ - :php:`MongoDB\Driver\ReadConcern <class.mongodb-driver-readconcern>`
46+ - The default read concern to use for database operations. Defaults to
47+ the client's read concern.
4848
49- * - readPreference
50- - :php:`MongoDB\Driver\ReadPreference <class.mongodb-driver-readpreference>`
51- - The default read preference to use for database operations. Defaults to
52- the client's read preference.
49+ * - readPreference
50+ - :php:`MongoDB\Driver\ReadPreference <class.mongodb-driver-readpreference>`
51+ - The default read preference to use for database operations. Defaults to
52+ the client's read preference.
5353
54- * - typeMap
55- - array
56- - The default type map to use for database operations. Defaults to the
57- client's type map.
54+ * - typeMap
55+ - array
56+ - The default type map to use for database operations. Defaults to the
57+ client's type map.
5858
59- * - writeConcern
60- - :php:`MongoDB\Driver\WriteConcern <class.mongodb-driver-writeconcern>`
61- - The default write concern to use for database operations. Defaults to
62- the client's write concern.
59+ * - writeConcern
60+ - :php:`MongoDB\Driver\WriteConcern <class.mongodb-driver-writeconcern>`
61+ - The default write concern to use for database operations. Defaults to
62+ the client's write concern.
6363
6464Return Values
6565-------------
@@ -81,7 +81,7 @@ by using the ``$options`` parameter.
8181Example
8282-------
8383
84- The following example selects the ``test`` database:
84+ The following example gets access to the ``test`` database:
8585
8686.. code-block:: php
8787
@@ -91,7 +91,7 @@ The following example selects the ``test`` database:
9191
9292 $db = $client->getDatabase('test');
9393
94- The following examples selects the ``test`` database with a custom read
94+ The following examples gets access to the ``test`` database with a custom read
9595preference:
9696
9797.. code-block:: php
@@ -101,10 +101,10 @@ preference:
101101 $client = new MongoDB\Client;
102102
103103 $db = $client->getDatabase(
104- 'test',
105- [
106- 'readPreference' => new MongoDB\Driver\ReadPreference('primaryPreferred'),
107- ]
104+ 'test',
105+ [
106+ 'readPreference' => new MongoDB\Driver\ReadPreference('primaryPreferred'),
107+ ]
108108 );
109109
110110See Also
0 commit comments