Feature #6868

Classes tagged as value object must have a constructor and no setters

Added by Robert Lemke over 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Reflection
Start date:
2010-03-16
Due date:
% Done:

100%

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

Description

To enforce the concept of (immutable) value objects, the class scheme builder should assure that classes which are tagged as properties

  • have a constructor method which is used for setting the object's properties
  • don't have any setter methods

If these rules are neglected, the persistence framework will run in trouble because it assumes that all values are set after the constructor has been called.

Associated revisions

Revision d05f6a03 (diff)
Added by Karsten Dambekalns over 9 years ago

[+FEATURE] FLOW3 (Reflection): When building class schemata the ReflectionService now checks value objects for a constructor and no setters, resolves #6868.
[~TASK] Party: PersonName now has a constructor and no longer any setters.

Revision 3840888d (diff)
Added by Karsten Dambekalns over 9 years ago

[+FEATURE] FLOW3 (Reflection): When building class schemata the ReflectionService now checks value objects for a constructor and no setters, resolves #6868.

History

#1 Updated by Karsten Dambekalns over 9 years ago

  • Target version set to 1.0 alpha 8
  • Start date set to 2010-03-16

#2 Updated by Karsten Dambekalns over 9 years ago

  • Category changed from Persistence to Reflection
  • Estimated time changed from 4.00 h to 2.00 h

#3 Updated by Karsten Dambekalns over 9 years ago

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

Applied in changeset r3961.

Also available in: Atom PDF