Skip to content

Commit b51e1b3

Browse files
committed
PHPLIB-65: Prototypes for database drop methods
1 parent 4b0d5ad commit b51e1b3

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

src/Client.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
namespace MongoDB;
44

5-
use MongoDB\Driver\Manager;
6-
use MongoDB\Database;
75
use MongoDB\Collection;
6+
use MongoDB\Database;
7+
use MongoDB\Driver\Manager;
8+
use MongoDB\Driver\Result;
89

910
class Client
1011
{
@@ -29,6 +30,17 @@ public function __construct($uri, $options, $driverOptions)
2930
$this->manager = new Manager($uri, $options, $driverOptions);
3031
}
3132

33+
/**
34+
* Drop a database.
35+
*
36+
* @param string $databaseName
37+
* @return Result
38+
*/
39+
public function dropDatabase($databaseName)
40+
{
41+
// TODO
42+
}
43+
3244
/**
3345
* Select a database
3446
*

src/Database.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
namespace MongoDB;
44

5-
use MongoDB\Driver\Manager;
65
use MongoDB\Collection;
6+
use MongoDB\Driver\Manager;
7+
use MongoDB\Driver\Result;
78

89
class Database
910
{
@@ -46,6 +47,16 @@ public function createCollection($collectionName, array $options = array())
4647
// TODO
4748
}
4849

50+
/**
51+
* Drop this database.
52+
*
53+
* @return Result
54+
*/
55+
public function drop()
56+
{
57+
// TODO
58+
}
59+
4960
/**
5061
* Select a specific collection in this database
5162
*

0 commit comments

Comments
 (0)