[dev] Re: [cvs] commit: framework/SyncML SyncML.php

Anthony Mills amills at gascard.net
Tue Mar 23 14:21:04 PST 2004


Yes, I thought I tried that, but it didn't seem to work.  If that is how 
it is supposed to work, I'll pay more attention.

Thanks,
Anthony

Jan Schneider wrote:

> Zitat von Anthony Mills <amills at gascard.net>:
>
>> I use $_SESSION['SyncML.state] to get and set values that need to
>> persits across page requests.  Currently I do this:
>>
>> $state = $_SESSION['SyncML.state'] ;
>>
>> $state->setVersion(1);
>>
>> $_SESSION['SyncML.state']  = $state;
>>
>> Instead of just:
>> $state = $_SESSION['SyncML.state'] ;
>>
>> $state->setVersion(1);
>>
>> When I run this from a different page request, this needs to be true.:
>>
>> $state = $_SESSION['SyncML.state'] ;
>>
>> $state->getVersion() == 1;
>
>
> Ah. You need references then or work on the session variable directly.
>
> Either:
> $state = &$_SESSION['SyncML.state'];
> $state->setVersion(1);
>
> or:
> $_SESSION['SyncML.state']->setVersion(1);
>
> Jan.
>
> -- 
> http://www.horde.org - The Horde Project
> http://www.ammma.de - Neue Wege des Lernens
> http://www.tip4all.de - Deine private Tippgemeinschaft




More information about the dev mailing list