Re: New handler for retrieving properties when object is serialized
| From: | Jakub Zelenka | Date: | Sat, 27 Jul 2013 13:58:00 +0000 |
| Subject: | Re: New handler for retrieving properties when object is serialized | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68329@lists.php.net to get a copy of this message | ||
>
> > Alternatively, could the problem perhaps be mitigated by making
> > available some utility functions for serializing native types?
>
> We could definitely make some parts of serializer API-accessible, or
> even make serializer as a whole to be more API-friendly, I think it'd be
> a nice idea if making implementing Serializable would be made easy by
> reusing serializer code and combining pieces. If now it's hard making it
> easier definitely a good idea, much better than creating one more API IMHO.
>
I was thinking about that and it could actually be done in a way that would
resolve the problem. I have just created RFC that specify the API.
https://wiki.php.net/rfc/internal_serialize_api
It's backward compatible and allow portable object generation in more
abstract way.
It's just draft so I am happy to do changes.
Jakub