New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need some better documentation please #119
Comments
I found https://github.com/mongolab/mongodb-driver-examples/blob/master/php/php_simple_example.php There is no documentation over the whole Internet |
To collaborate with the documentation: It took more than 2 days to find the way. I hope it helps someone. |
I've run into the same problems where my old method of "just type what I want to do into Google" always explains how to do it with the old driver. I have found the API to be useful though: http://mongodb.github.io/mongo-php-library/api/namespace-MongoDB.html In particular the Client and Collection classes. There's no plainly written examples but having written a lot of code with the old driver I was able to figure stuff out. So yes, as you've noticed |
Thank you @jacqueswaller |
I have a problem with deserialisation. Create client with typemap option:
But
returns me array of objects:
|
I don't have the driver installed atm to test so I can't say for sure, but looking at the API I think that
the same way that |
@elfeffe: Glad you got this sorted out. The prose-style documentation still needs a bit of love, so the API documentation that @jacqueswaller suggested is definitely worth looking at. As a general rule, most of the Collection and Database methods use an Operation class, where we've documented all of the options in the constructor. Of course, I still need to port that over to the prose documentation, since users shouldn't be expected to poke around generated API docs for such basic info. @p-golovin: We can't support a In the future, please open a new issue unless your question is identical to the OP. That will ensure we don't lose track of things and make it easier for other folks to follow conversation or dig up the question/answer down the line. |
This is not a bug in the code (I hope) but is a problem with the documentation.
I find how to get collections and then do a var_dump, but I can't find any place that helps me to get some field on that object.
I have tried every single way to do this, and it seems that find or findOne doesn't work. Documentation is not good enough and that's very bad for MongoDB, we just can't advance in our projects.
I have this document
Can somebody tell me how to get userId from that document in PHP?
Also I have noticed that find and findOne returns different objects, different data.
Can somebody tell me how to get userId from one result and from a collection in a foreach?
This is a silly question, but I can't find any documentation that says that. All the examples are for the old driver (mongo, not mongodb), but not for this.
Thank you
The text was updated successfully, but these errors were encountered: