[TYPO3-dev] Fully Blown StdWrap - Check it out!

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Thu Mar 16 00:27:55 CET 2006


JoH schrieb:
> You won't have any XCLASS conflicts with this solution:
> Simply XCLASS tslib_content by adding a new function.
> If this function is available it will be called by the foreach loop as soon
> as you trigger it with the corresponding TS property.
> 

I expect a lot of XCLASS conflicts. I'am sure it's not the one
extension XCLASSSING tslib_cObj. ;-)


>>What you propose will logicially follow of this in anyway. I can't
>>judge if it would be possible to implement it before an effort of
>>modularization.
> 
> 
> Well - it is already completely unitised - each stdWrap function is executed
> by a corresponding PHP function.
> So you can keep this basic functionality and extend it with as many TS2
> features as you like.

You did indeed some additional modularization, like for
setContentToCurrent, setCurrent, etc. . Still one needs another XCLASS
to customize this functions. I think it would be of additional value
if you set a hook into each of this functions. Then each could be
extended without further XCLASS conflicts a a very flexible way.
Another step of refactoring towards TS2.

performance

You build a new object for each wrap only for to check the functions
existance: $classCheck = t3lib_div::makeInstance('tslib_cObj'); I
think that is a big overhead. You could do the same with a singleton.

In this case the singleton is already very near. Instead of

 $methodCheck = array($classCheck, $functionKey);

You could do:

 $methodCheck = array($this, $functionKey);

for PHP4 i think this:

 $methodCheck = array(&$this, $functionKey);

I didn't test. Maybe it works.


Regards

Elmar
























More information about the TYPO3-dev mailing list