[TYPO3-mvc] initializeObject() pointless?

Martin Kutschker masi-no at spam-typo3.org
Wed Jun 16 18:34:32 CEST 2010


Sebastian Kurfürst schrieb:
> Hey,
> 
>>> But why would I need that? What I really need is a reconstituteObject()
>>> method called by after thawing.
> I discussed this feature with Robert today, as I think that is needed as
> well.
> We'd propose the following:
> - initializeObject() is called again after reconstitution, and after the
> dependencies are re-injected (in FLOW3)

So thrice in total?

> - there will be a new parameter to initializeObject, so one can check if
> the object is NEW or RECONSTITUTED, if somebody needs that check.
>
> Does this make sense?

The parameter, yes, calling the same method in different contexts, no.

I would think it to be more clear if a different method thawObject($isNewObject) is called after the
reconstitution.

This will come in handy. Anyway, I now much more in favour of an extended data mapping scheme. The
current code (Extbase) isn't extensible at all. Fiddling with a "hook" after reconstitution to do
proper custom mapping is only a hack. A much better IMHO is to give the data mapper the necessary
info it needs.

Masi



More information about the TYPO3-project-typo3v4mvc mailing list