[imp] $imp vs. $_SESSION['imp']
Chuck Hagenbuch
chuck at horde.org
Fri Sep 15 10:03:23 PDT 2006
Quoting Otto Stolz <Otto.Stolz at uni-konstanz.de>:
> - Is there any difference between $imp and $_SESSION['imp']?
Use $_SESSION['imp']. $imp is a not-entirely-reliable reference to
$_SESSION['imp'].
> - Are they preserved over a user session, and are they
> kept apart across user sessions?
They _are_ session data.
> - Can I write in my own component, say $imp['knu'],
> and will this component be preserved over a user session?
Yes.
> - Or should I rather use $imp['cache']['knu']?
I'm not sure why 'cache'.
> Or perhaps $_SESSION['imp']$imp['cache']['knu']?
I don't understand what that would be.
> - When and how are these arrays set, during login;
> which custom hooks can rely on them, and which can't?
They're set by IMP_Session::createSession(). Hooks called after that
function is called can rely on them, others can't. Off-hand I can't
tell you which those are.
-chuck
--
"we are plastered to the windshield of the bus that is time." - Chris
More information about the imp
mailing list