[Typo3-dev] extending extensions

Carlos Chiari (DE) ccho at dimension-e.net
Thu Jan 15 16:36:59 CET 2004


Hi Boris:


> but - and this is what I'm getting headache of - what if two of these
> classes overwrite the same function? this can happen, it will happen, and
> then the extension should ask the user the next time "are you ready for
> surprises"?


This seems to be the main issue here.



> or we let the extensions extend themself and see if everything works as
> expected or if the server starts dancing. for this purpose I would also
add
> to the extension-manager a tool which examines the installed extensions
for
> any conflicts.

There are three (3) possible checks:

a. if an extension extends a class already extended,

b.  how many times this happens

c. if  (b) > 1, then scan the extensions classess and make a list of
extended methods, properties


If at c we find any conflict, ie: two methods being modified, then ask for
action.


>
> Especially what you, Kasper, wrote: "class blablabla extends
$someClassname"
> is not possible, but no problem, because we could create a file, where the
> basis-class and the extension-classes are included. this would only be
> necessary if a extension is installed/ updated. no performance-problem.


This sounds smart



>so no extension would know nothing about any other...

Kasper also says this would be desirable:  Some sort of "system class being
extended only when this extension is doing its job".

The whole XCLASS method allows the developer to modify a class that has a
"global" scope, otherwise he would write a new class that just extends the
basis class, and use it instead, or create an object that instantiates the
base class, and doesnt uses the "makeInstance" method.

Other than this, seems to me, its a highly speciallized use/need of system
classes... and ... er.... I believe should be left for developers making
custom works for their clients, as less than 1% typo3 installations would
need something like this.

Am I wrong? What could be a common scenario that would require core typo3
system/developer to address this?

Regards

Carlos







More information about the TYPO3-dev mailing list