Hi, On Sat, 2010-05-15 at 15:33 +0100, Jared Williams wrote: > With using traits, don't have to provide an implementation > of jsonSerialize() unless want to customise the behaviour, > but the current implementation will require having to > implement JSONSerializable.
No. The default behavior will put the public properties from a PHP object in the JSON object. The interface tells the encoder not to use the default behavior but call the methods. Your traits can only provide a default behavior not help with the decision to be made. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php