[TYPO3] Persistent vars over multiple calls of postUserFunc

Francois Suter fsuter at cobweb.ch
Sat Sep 27 14:50:47 CEST 2008


Hi,

> So I tried using a class property, but this does not work:
> 
> -- 
> class user_functions{
>   var $myClassVar = 0;

Nearly there :-)

What you want is a static property:

static $myClassVar = 0;

which you then call using:

self::$myClassVar

HTH

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-english mailing list