Feature #6869

Enable the property mapper to create value objects

Added by Robert Lemke about 10 years ago. Updated over 9 years ago.

Must have
Start date:
Due date:
% Done:


Estimated time:
2.00 h
PHP Version:
Has patch:


Immutable value objects don't have any setter methods. However we want the property mapper to be able creating such objects (e.g. after a form has been submitted). Therefore the transformToObject method needs to be aware of this situation.

If no setter methods could be found (well, if ObjectAccess doesn't allow setting the property), the mapper should check if a constructor parameter of that name exists. The challenge however is that properties cannot be set individually during the for loop but must be collected and then set while creating the object.

Associated revisions

Revision f1d7ed1e (diff)
Added by Karsten Dambekalns about 10 years ago

[~TASK] FLOW3 (Persistence): Fixed Jochen's favorite FLOW3 code snippet, see http://twitter.com/jocrau/statuses/10537988072
[+FEATURE] FLOW3 (Property): When creating object the PropertyMapper now makes use of constructor arguments, this enables value object creation and thus resolves #6869.


#1 Updated by Karsten Dambekalns about 10 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3960.

Also available in: Atom PDF