[FLOW3-general] How to use value objects
Karsten Dambekalns
karsten at typo3.org
Wed Mar 23 21:59:31 CET 2011
Hi.
On 24.02.11 09:22, lukas lentner wrote:
> I understand that VO have no setters and get their values through constructing. But why leads
>
> $this->date = $this->objectManager->create('F3\FamilyNetwork\Domain\Model\Value\Date');
> $this->location = $this->objectManager->create('F3\FamilyNetwork\Domain\Model\Value\Location');
Because they both have an empty value. In fact that should give you an
error because of a missing constructor parameter.
> sometimes 2 different objects have both no values but are still not identical!
That is true for entities, but value objects without a value are, well,
"not real".
Regards,
Karsten
More information about the FLOW3-general
mailing list