[Typo3-dev] User extension of class.t3lib_div.php

=?us-ascii?Q?=22Kasper_Sk=E5rh=F8j=22?= kasper at typo3.com
Wed Sep 3 02:56:35 CEST 2003


It would be quite easy to make a search/replace on t3lib_div:: to $GLOBALS['DIV']->

(and for other classes as well) but what is the performance loss ? ( if any) - and it is also uglier.

But it would be backwards compatible!


We can discuss later this month.



God bless

- kasper

*********** REPLY SEPARATOR  ***********

On 02-09-2003 at 14:23 Christian Jul Jensen wrote:

>Hi
>
>On Tue, 02 Sep 2003 14:14:25 +0200, Ingmar Schlecht
><ingmars at REMOVETHISweb.de> wrote:
>
>> Christian Jul Jensen wrote:
>
>> > The problem with this is that t3lib_div also provides the
>> > makeInstance function that checks for user extensions of classes, in
>> > other words the class is instantiated without checking for any user
>> > extension.
>> 
>> No, t3lib_div is AFAIK never instantiated. Tthe functions are always 
>> called directly like this: "t3lib_div::doSomthing();", so no extension
>> class would be used anyway.
>
>Ahhh, that makes sense.
>
>> ...which makes this suggestion obsolete:
>> > Maybe makeInstance should be moved to a class for itself in future
>> > releases, in order to avoid this problem.
>
>You're right. Still these functions should be extend-/changeable, so
>maybe making a global object $DIV, instantiated by
>t3lib_div::makeInstance('t3lib_div'); would be a solution. That way you
>could actually modify even the makeInstance function.
>
>> "Solution" would be to hardcode it into the t3lib_div PHP-file or 
>> otherwise provide a completely independant class and call it like 
>> tx_yourext_div::doSomething().
>
>The problem is that the function is called from other scripts, which I
>have no intention of changing. In particular I'm trying to solve the
>problem for the da_newsletter extension, and I could fix at a higher
>level, just figured it would be cleaner to do it in the div-script,
>since the other encoding is done here.
>
>Thanks a lot Ingmar, you saved me a lot of time there.
>
>
>-- 
>Christian Jul Jensen
>Freelance webprogrammer
>TYPO3 typehead Denmark
>_______________________________________________
>Typo3-dev mailing list
>Typo3-dev at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev



God bless

- kasper


- kasper
-------------------- o ---------------------
>>>    In God I trust - others pay cash!     <<<
Check www.typo3.com







More information about the TYPO3-dev mailing list