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

Jan Schneider jan at horde.org
Tue Mar 23 12:27:19 PST 2004


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