-
Notifications
You must be signed in to change notification settings - Fork 260
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
Documentation updates #144
Conversation
The return type documentation should have been updated when the typMap option was introduced in PHPLIB-133.
This should have been updated in PHPLIB-164.
c2572ed
to
494c9a0
Compare
cc09b9a
to
0752177
Compare
|
||
**Note:** BSON deserialization of inline aggregation results (i.e. not using a | ||
command cursor) does not yet support a custom type map. Support is pending new | ||
functionality in the driver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this include documents with _pclass
attributes? If so that might be worth mentioning. The sentence could be construed to mean only that the type
option is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__pclass
would still apply here. Based on the persistence specification, it is only ignored if the type map specifies "array" or "object" (i.e. stdClass) or if the class found in the __pclass
field is not suitable (e.g. not found, not implementing an interface). I'll clarify that in these documentation blurbs.
, found but missing an interface).
@moderndeveloperllc: I added notes on when Persistable kicks in and also created a separate BSON tutorial page. Thanks for the feedback. |
@jmikola Thanks! I see the tutorial/bson on the github.io, but not your repo for some reason. Perhaps I'm just not looking in the right spot. It may be useful to show how the data looks when viewed with the mongo shell. I added a created date to the class to show how to use a type like
with the data showing in the mongo shell as:
and the var_dump as:
|
The return type documentation should have been updated when the typMap option was introduced in PHPLIB-164.
@moderndeveloperllc: I actually forgot to add the
Added both of these examples. Thanks! I also left a note in PHPC-536 to come back and revise this example once UTCDateTime's constructor is enhanced to default to the current time. |
Manually merged to |
Nice. And thanks for cleaning up my example for readability. I had been wondering about the very thing PHPC-536 addresses. |
See http://jmikola.github.io/mongo-php-library/ for a preview.