Feature #6869

Enable the property mapper to create value objects

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

Status:
Resolved
Priority:
Must have
Category:
Property
Start date:
2010-03-16
Due date:
% Done:

100%

Estimated time:
2.00 h
PHP Version:
Has patch:
Complexity:

Description

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.

#1

Updated by Karsten Dambekalns about 11 years ago

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

Applied in changeset r3960.

Also available in: Atom PDF