[TYPO3-ect] div: discuss browserSession

Fabien Udriot fudriot at omic.ch
Thu Jun 26 11:27:32 CEST 2008


Consider also this code:

tx_div::user()->setKey('ses',$key,$value);

Or:

tx_div::session($key,$value); //setter
tx_div::session($key); //getter


Franz Holzinger a écrit :
> Hello,
> 
> there is a function browserSession in div:
> 
> function browserSession($key, $value = NULL) {
> 	if($value != NULL)
> 		$GLOBALS['TSFE']->fe_user->setKey('ses', $key, $value);
> 	return $GLOBALS['TSFE']->fe_user->getKey('ses', $key);
> }
> 
> Do you consider this as a good style to use a function for setting as
> well as getting a value?
> IMHO this is rather hard to follow. I would prefer to have setter and
> getter functions for all kind of things.
> 
> function setBrowserSession
> 
> function getBrowserSession
> 
> 
> 
> - Franz


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