[TYPO3-ect] Registry-Pattern for lib/div?
Christian Welzel
gawain at camlann.de
Wed Aug 15 23:05:34 CEST 2007
Joerg Schoppet wrote:
> When I look into the sources of lib I see a lot of object-references
> (-copies). I mean, the controller creates the different objects
> (context, parameter, configuration) and "copies" itself to all of these.
This is a problem of PHP4 which does per default always copy objects on
assignments. The solution would be either to drop PHP4 support, and get
rid of the copying with PHP5 (which assigns objects always per reference)
or to mark all necessary places with a reference operator
[ function controller(&$controller) { $this->controller = &$controller; } ].
I believe introducing a new concept like a registry doesn't make lib/div
easier to the average extension developer.
--
MfG, Christian Welzel
GPG-Key: http://www.camlann.de/key.asc
Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15
More information about the TYPO3-team-extension-coordination
mailing list