[TYPO3-ect] recursive pid function for tx_div

Elmar Hinz elmar07 at googlemail.com
Mon Aug 13 17:27:45 CEST 2007


Steve Ryan wrote:

> 
>> 
>> Something lost here?
>> 
>>> $pidQuery='(pid='.implode(' or pid=',$pidList).')';
>> 
>> Maybe?
>> 
>> $pidQuery='( 0 '.implode(' or pid=',$pidList).')';
>> 
> as long as there is one element in the array of pids, the first is OK

Well, yes. You are ritght, "implode" starts with an element.

> (updated code below ensures one element or returns empty array)

Fine.


> 
> 
> More or less
> The static variable needs to be in the scope of the class
> eg
> 
> class tx_markablequiz_controller {
>    static $cObj ;

... 

If it's part of an object. Me question was for the static class tx_div, so
that the function could be called from everywhere. The static varibale has
to exist in the scope of this function. This examples show the use in
functions in instanced classes.

http://www.php.net/manual/en/language.variables.scope.php
http://www.php.net/manual/en/language.oop.php

I am not sure if it also would work as expected inside the static class
tx_div.

Regards

Elmar






















More information about the TYPO3-team-extension-coordination mailing list