RE: [PHP-DEV] Exposing jsonSerialize's depth
| From: | Jani Ollikainen | Date: | Mon, 16 Jan 2017 08:22:27 +0000 |
| Subject: | RE: [PHP-DEV] Exposing jsonSerialize's depth | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97777@lists.php.net to get a copy of this message | ||
Hi,
> This looks like a hack covering for deficient design. Having objects that look differently
> depending on hidden parameters without anybody explicitly
> modifying them is a recipe for very hard to track bugs. I don't think we should encourage
> this.
>
> There are ways to present serialized view of the object (sleep/wakeup, Serializable, etc.) but
> I don't think depth has anything to do with it.
There is no hidden parameters. There is no "without anybody explicitly modifying".
It's data that is in MongoDB. It's basicly autoloading for mongodb's dbrefs. https://docs.mongodb.com/manual/reference/database-references/#dbrefs
And yes, it doesn't have anything to do with that.