[TYPO3-dev] Quick PHP question
"Christian Müller (FLOW3 Team)"
christian.mueller at typo3.org
Wed Mar 14 13:55:44 CET 2012
Sorry for the empty answer, hit the wrong key combination...
I think this sentence is a bit misleading, fact is that a class cannot
extend from more than one other class. So you need a chain of extensions
to do that. As you cannot know if other extensions want to extend the
same class as you at some point in time the XCLASS configuration
basically helps to build such an "extended class chain" without knowing
all possible extensions.
Thats all, so no, a PHP class can be extended by many classes, but a
class can only extend one other class at a time.
Cheers,
Christian
On 14/03/12 13:43, Oliver Salzburg wrote:
> I just read the following part in the TYPO3 core API documentation:
>
>> Hooks are the recommended way of extending TYPO3 compared to
>> extending the PHP classes with a child class (see "XCLASS
>> extensions"). It is so because only one extension of a PHP class can
>> exist at a time while hooks may allow many different user-designed
>> processing functions to occur.
>
> The statement "only one extension of a PHP class can exist at a time"
> is really confusing me.
> Was that true at some point in time or did I just skip some important
> pages in my PHP lecture?
More information about the TYPO3-dev
mailing list