We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afb7487 commit 81fcefcCopy full SHA for 81fcefc
src/Client.php
@@ -40,6 +40,14 @@ class Client
40
*/
41
public function __construct($uri = 'mongodb://localhost:27017', array $uriOptions = [], array $driverOptions = [])
42
{
43
+ $driverOptions += [
44
+ 'typeMap' => [
45
+ 'array' => 'MongoDB\Model\BSONArray',
46
+ 'document' => 'MongoDB\Model\BSONDocument',
47
+ 'root' => 'MongoDB\Model\BSONDocument',
48
+ ],
49
+ ];
50
+
51
if (isset($driverOptions['typeMap']) && ! is_array($driverOptions['typeMap'])) {
52
throw new InvalidArgumentTypeException('"typeMap" driver option', $driverOptions['typeMap'], 'array');
53
}
0 commit comments