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

Peter Russ peter.russ at 4many.net
Tue Feb 7 19:42:14 CET 2006


Franz Holzinger schrieb:
[...]
> TYPO3 will go the way to PHP5 in the future.
> So the solution would be that each TYPO3 class is based on an interface
> class. Then the inheriting class can override all methods it wants. I
> think, a XCLASS will not be needed any more with abstract interface
> classes. If a class is derived from an abstract interface and passed as
> a parameter to a TYPO3 function, then the methods of the deriving class
> would be called (if defined) by the TYPO3 function and not any more the
> method of the corresponding basic TYPO3 class. I think this should
> become possible with PHP5.

It's not based on an interface, it's "implement" an interface. So a 
class can extend a basic class and implements different interfaces to 
communicate with other classes. Just have a look at JAVA.

The question still exists: if a class A should be replaced by class B 
AND class C who wins? No problem as long as they extend different 
methods/functions. But replacing same functions would result in a "last 
one wins" situation. A solution might be to overload methods and 
differentitate methods call by unique vars.

Regs. Peter.

-- 
Fiat lux!
Docendo discimus.
_____________________________
4Many® Services
openBC: http://www.openbc.com/go/invuid/Peter_Russ




More information about the TYPO3-dev mailing list