Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.21.0

Request #3762 not serialize null object properties
Submitted: 2005-03-10 13:26 UTC
From: mark at mitchenall dot com Assigned: schst
Status: Closed Package: XML_Serializer
PHP Version: 4.3.10 OS: Any
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-10 13:26 UTC] mark at mitchenall dot com
Description: ------------ It would be useful to have an option, e.g. ignoreNullProperties, which doesn't serialize an object property if it is NULL. Either that, or perhaps allow developers to define their own serialize methods in classes where elements need special handling. Maybe in a similar way to DB_DataObject and the 'validate' methods. Adding an ignoreNullProperties option I can add myself, if that's useful, and send the patch. The second method using custom serialize methods I haven't figured out the nicest way of implementing yet, so I wont comment too much on that.

Comments

 [2005-03-10 18:47 UTC] mark at mitchenall dot com
not sure what happened with the subject of this feature request, but it should be 'not serialize null object properties'
 [2005-03-25 17:32 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!