[TYPO3-dev] Informations about the best way to replace a function in a class

Michael Stucki michael at typo3.org
Mon Jul 10 19:51:02 CEST 2006


Pierre Rouwens wrote:

> OK i understand... so what the best way to achieve this ?

You would have to change all places where t3lib_BEfunc is called... Pretty
hard to solve I suppose.

Long-term solution: Request a hook that does what you want.

- michael

> Michael Stucki a écrit :
>> Pierre Rouwens wrote:
>> 
>>> I need to replace a function in tslib_BEfunc. What is the best way to
>>> achieve it ? i know using xclass is bad ? but what can i do else ?
>>> I'm starting an extension where i can configure stuff to work with the
>>> workspace, and i'm trying to understand the whole system.
>> 
>> I suppose you mean t3lib_BEfunc. Of course XCLASSes are generally a bad
>> idea (see other discussions) but even more in case of this class it will
>> not work.
>> 
>> The reason is that most parts (if not all) of t3lib_BEfunc are
>> class-functions which are called (::) without instanciating the class
>> object (which is required to use XCLASSes).
>> 
>> - michael

-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/




More information about the TYPO3-dev mailing list