[TYPO3-dev] SOLUTION (?) : Multiple XCLASS inheritance

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Tue Feb 7 20:55:51 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jerome Schneider schrieb:
> I'm currently working on a solution to allow TYPO3 developpers to extend the 
> same extension several times ( instead of just one time using XCLASS )

[...]

> I already implemented such a weaver and succesfuly integrated it in TYPO3, 
> packaged as an extension.
> I tested it on typo3 extensions with 3 levels of inheritance ( instead of 
> only one using XCLASS ) and it works great.
> 
> However my implementation of this idea is, for the moment, really trivial, 
> and I'm posting this to get some feedback to know if it's worth the matter 
> to go deeper in this direction.

Hello Jerome,

It sounds interesting. The current method of "static xclassing" can build an
unlimited chain of inheritenced classes, as long as each class knows the exact
name of the parent.

A kind of "dynamic xclassing" where each class only needs to know the name of
the original class would be an improvement. I think this is the principle of
your proposal, even if I missed some details of your concept.

As Peter Russ already remarked any form of "dynamic xclassing" does only work,
as long as the classes extend different methods. As soon as they overwrite same
methods, we get the old conflicts again.

For this reason I would expect that a new dynamix xclass framework (the "weaver
classes" in cooperation with the installer tool), checks, if there is a
concurrence of any function in the xclasses. In this situation it should throw
an informative error message already during installation and exit the
installation process of the new extension.

Regards

Elmar

















-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD6PtGO976RNoy/18RAuCaAKCExB7Nd2SINuJe0yrrvLoKbLPGfQCfdNut
pJSwhc2BQhSOLz4GEZeY/aE=
=15x9
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list