[TYPO3-core] RFC: #11836: Remove final from classes
Ernesto Baschny [cron IT]
ernst at cron-it.de
Tue Sep 1 09:06:40 CEST 2009
Mathias Schreiber [wmdb >] schrieb:
> Martin Kutschker schrieb:
>> The final keyword is used solely for classes that have only static
>> functions and should therefore not be instantiated at all. Technically
>> you could extend them, but it makes little sense to do so.
>
> I disagree.
> It happened quite a few times that we needed to patch (ergo xclass)
> befunc or t3lib_div.
>
> So I bascially welcome this patch.
You cannot XCLASS t3lib_div, exactly because people call it statically,
ergo they will never call your XCLASSed ux_t3lib_div. They call:
t3lib_div::getUrl()
and not
$class = t3lib_div::makeInstanceClassName('t3lib_div');
$class::getUrl();
So it is technically "static" and not extendable, ergo the final is ok
here. It doesn't even have a XCLASS statement.
Cheers,
Ernesto
More information about the TYPO3-team-core
mailing list