[TYPO3-dev] Quick PHP question

Jigal van Hemert jigal at xs4all.nl
Wed Mar 14 14:00:11 CET 2012


Hi,

On 14-3-2012 13:43, Oliver Salzburg wrote:
> 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?

No, it's the way XCLASSes are implemented. There is one item available 
in the global configuration array to define which script contains the 
extended version of the class.

This is done because the XCLASSing needs to happen transparently to the 
code which creates the object:
$localCObj = t3lib_div::makeInstance('tslib_cObj');

This might result in an object of class ux_tslib_cObj if an extension 
defined an XCLASS of tslib_cObj.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.



More information about the TYPO3-dev mailing list