Hey there,I got the listCollections to work but with a caveeat:$client = new MongoDB\Client($host);$db = $client->selectDatabase($db);$collections = [];foreach ($db->listCollections() as $collection) {$x = $collection->__debugInfo();$collections[] = $x;}I found no way to get the information without using __debugInfo(), also the vars in the original object were private.Is this a bug or am I missing something?I am a big fan of non (overdone) OOP approaches since the current request is usually the only instance we have to take care of, thats why I opt for static calls where possible.
I see a lot of OOP here which makes things very complicated.- Johannes
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/da56437f-03c1-4f23-a43c-81f82a88b672%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
For API methods in the library that abstract database commands, we purposefully return objects when possible. Since the server can, and has, changed the format of its results between releases, this allows us to insulate users from unexpected changes and provide an API that can be trusted for at least the current major version number of the library. Our current approach is influenced by my prior experience using the old driver for a number of years and developing Doctrine ODM, where there was quite a bit of code written just to handle variations and inconsistencies in server results.
I don't see the relation between programming style and dealing with the "current request". I can say that the library's current implementation makes it much easier to test than a more procedural implementation.
I see a lot of OOP here which makes things very complicated.- Johannes
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.