Skip to content

Commit fd0a837

Browse files
committed
Merge pull request mongodb#2236 from ThomasWestrelin/ThomasWestrelin-patch-1
Add setDatabase to Jenssegers\Mongodb\Connection
2 parents 2e05a0c + 6a68d68 commit fd0a837

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Jenssegers/Mongodb/Connection.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,16 @@ protected function getDefaultSchemaGrammar()
266266
{
267267
return new Schema\Grammar();
268268
}
269+
270+
/**
271+
* Set database.
272+
* @param \MongoDB\Database $db
273+
*/
274+
public function setDatabase(\MongoDB\Database $db)
275+
{
276+
$this->db = $db;
277+
}
278+
269279

270280
/**
271281
* Dynamically pass methods to the connection.

0 commit comments

Comments
 (0)