Skip to content

Commit 73b6a91

Browse files
authored
Merge pull request #2236 from ThomasWestrelin/ThomasWestrelin-patch-1
Add setDatabase to Jenssegers\Mongodb\Connection
2 parents 114afa0 + 3bd58e0 commit 73b6a91

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)