1 | <?php |
||
15 | final class MongoClient implements MongoClientInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var \MongoDB\Driver\Manager |
||
19 | */ |
||
20 | private $driverManager; |
||
21 | |||
22 | public function __construct($uri = 'mongodb://127.0.0.1', $uriOptions = [], $driverOptions = []) |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @param string $namespace |
||
30 | * @param array|object $filter |
||
31 | * @param array $queryOptions |
||
32 | * @return string[] |
||
33 | * |
||
34 | * @throws \MongoDB\Driver\Exception\Exception |
||
35 | * @throws \MongoDB\Driver\Exception\AuthenticationException if authentication is needed and fails |
||
36 | * @throws \MongoDB\Driver\Exception\ConnectionException if connection to the server fails for other then authentication reasons |
||
37 | * @throws \MongoDB\Driver\Exception\RuntimeException on other errors (invalid command, command arguments, ...) |
||
38 | */ |
||
39 | public function executeQuery($namespace, $filter, $queryOptions = array()) |
||
45 | |||
46 | /** |
||
47 | * @param string $namespace |
||
48 | * @param array|object $document |
||
49 | * @param array|null $options |
||
50 | * @return bool Whether or not the write was acknowledged |
||
51 | * |
||
52 | * TODO: Any sort of feedback from insert was never actually processed before. |
||
|
|||
53 | * It would be prettier if it was somehow. |
||
54 | * |
||
55 | * TODO: The driver docs I have locally state a different set of possible exceptions than |
||
56 | * the documentation on php.net - figuring out what is actually going to happen |
||
57 | * would be preferred. |
||
58 | * |
||
59 | * @throws \MongoDB\Driver\Exception\Exception |
||
60 | * @throws \MongoDB\Driver\Exception\AuthenticationException if authentication is needed and fails |
||
61 | * @throws \MongoDB\Driver\Exception\ConnectionException if connection to the server fails for other then authentication reasons |
||
62 | * @throws \MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors |
||
63 | * @throws \MongoDB\Driver\Exception\BulkWriteException on any write failure (e.g. write error, failure to apply a write concern) |
||
64 | * @throws \MongoDB\Driver\Exception\RuntimeException on other errors |
||
65 | */ |
||
66 | public function insert($namespace, $document, $options = null) |
||
85 | } |
||
86 |