Singleton behaviour of LiveUser_Admin??

Tim Daeleman <[email protected]>
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Hi,


thanks to your help I got the singleton behaviour for LiveUser working.

--
i.e.
$conf = ...full config array...;
$oLU = LiveUser::singleton($conf);

and inside a class definition then call:

$this->oLU = LiveUser::singleton($emptyConf);

has me referencing the same LU object.
--

When I try to do the same with the LiveUser_Admin class it doesn't work.
The reason for this is that I have to submit a autoInit option set to 
true for LiveUser_Admin to ork (don't ask me why).

So the first part works:

--
$conf = ...full config array...;
$oLUA = LiveUser_Admin::singleton($conf);

But when I am in a class definition and call

$this->oLUA = LiveUser_Admin::singleton($emptyConf);
--

It doesn't work, the already instantiated LU_Admin object isn't "found".
And because I don't have access to the config array within the class 
definition I can't resubmit it. Just setting $emptyConf["autoInit"] = 
true breaks everything even more.

Any idea how I can get this to work?? Again I don't want to throw around 
config arrays and LU objects.

I hoped I could do it like this

$conf = ...full config array...;
$oLU = LiveUser::singleton($conf);

and inside a class definition then call:

$this->oLU = LiveUser::singleton($emptyConf);
$conf = $this->oLU->getConfig();
$conf["autoInit"] = true;
$this->oLUA = LiveUser_Admin::singleton($conf);

But there's no getConfig method.

Or maybe an init method for the LiveUser_Admin class could help me?

thx again in advance for the help.

cheers,

Tim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.