Closed evert closed 8 years ago
Nice idea!
@evert what do you think about doing the same for object
type?
class VO1 {
public $foo = new SubVo();
}
class SubVo {
public $name;
public $xyz;
}
in this case we would not create a new object in the deserializer but pickup the one already present in the object-property...?
Well, I don't think that's valid PHP ;)
More importantly, you can actually achieve this with the mapValueObject function already.
This is a feature for VO's such as this:
Specifying the empty array as the default will cause the parser to assume that foo may appear more than once and append elements to the array.
cc: @staabm