Re: [LiveUser] How to get an existing LiveUser instance ?

From: Date: Tue, 16 Mar 2004 08:00:55 +0000
Subject: Re: [LiveUser] How to get an existing LiveUser instance ?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11315@lists.php.net to get a copy of this message
Kerphi wrote:
Hi, I tried to use LiveUser package in my application. I've a problem because I call LiveUser::factory() twice and the second call generates an error. What I whould like to do is to automaticaly get an existing instance of LiveUser or create it if it doesn't exist. Is it possible in LiveUser package or should I create my own singleton to be sure that only one instance of LiveUser exists ?
YOu should use the singleton() method instead. It will ensure that only a single instance of liveuser is created. Gruss, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.general (#11315) next »