RE: [PHP] Singleton with variable parameters

2010-12-15 Thread Tommy Pham
> -Original Message- > From: Nathan Nobbe [mailto:quickshif...@gmail.com] > Sent: Wednesday, December 15, 2010 1:31 PM > To: Sebastian Detert > Cc: php-general@lists.php.net > Subject: Re: [PHP] Singleton with variable parameters > > On Wed, Dec 15, 2010 at 2

Re: [PHP] Singleton with variable parameters

2010-12-15 Thread Nathan Nobbe
On Wed, Dec 15, 2010 at 2:11 PM, Sebastian Detert wrote: > Hi guys, > > I am trying to generate an abstract Singleton class for use in arbitrary > classes, like > > class Foo extends Singleton {} > > and generate a new class with Foo -> getInstance(); > Until traits release I think you'll find th

[PHP] Singleton with variable parameters

2010-12-15 Thread Sebastian Detert
Hi guys, I am trying to generate an abstract Singleton class for use in arbitrary classes, like class Foo extends Singleton {} and generate a new class with Foo -> getInstance(); How can I manage to use this with an unkown number of parameters like Foo -> getInstance('a', 'b'); ? Somethin

Re: [PHP] Singleton pattern question

2003-12-31 Thread Raditha Dissanayake
Hi,. Unfortunately in PHP this may be true, however in j2ee if you use the singleton pattern the result would be what you expect. happy new year. Hardik Doshi wrote: Hi Group, Currently i am using the singleton design pattern in one of my projects. I was under impression that by using the sing

[PHP] Singleton pattern question

2003-12-31 Thread Hardik Doshi
Hi Group, Currently i am using the singleton design pattern in one of my projects. I was under impression that by using the singleton pattern i need to initialize system configuration only one time (At the time of login) but once i implemented the system, i came to know that system initializes an

RE: [PHP] Singleton Was: [PHP] OO parent/child relationship

2003-10-07 Thread Andy Crain
03 5:36 PM > To: 'PHP List' > Subject: [PHP] Singleton Was: [PHP] OO parent/child relationship > > Gerard Samuel wrote: > > > Andy Crain wrote: > > > >> This all seems like a perfect case for the singleton pattern. See > >> http://

[PHP] Singleton Was: [PHP] OO parent/child relationship

2003-10-06 Thread Gerard Samuel
Gerard Samuel wrote: Andy Crain wrote: This all seems like a perfect case for the singleton pattern. See http://www.phppatterns.com/index.php/article/articleview/6/1/1/ and http://www.phppatterns.com/index.php/article/articleview/75/1/1/ Andy Im currently trying to wrap the brain around the Singl

[PHP] singleton feature

2002-06-24 Thread Purushotham Komaravolu
Hi , I have a small suggestion. I guess it is a good feature to have a provision to have a Singleton class per webserver instance. This is especially useful for maintain user defined connection pools, loggers etc. Thanks Regards, Puru

RE: [PHP] Singleton

2001-10-23 Thread Victor Hugo Oliveira
, 23 de outubro de 2001 19:03 To: [EMAIL PROTECTED] Subject: Re: [PHP] Singleton Use sessions (like session_start() ) -- Andrey Hristov Web Developer Icygen Corporation BUILDING SOLUTIONS http://www.icygen.com On Tuesday 23 October 2001 11:55 am, you wrote: > I'd like to to make a S

Re: [PHP] Singleton

2001-10-23 Thread Andrey Hristov
Use sessions (like session_start() ) -- Andrey Hristov Web Developer Icygen Corporation BUILDING SOLUTIONS http://www.icygen.com On Tuesday 23 October 2001 11:55 am, you wrote: > I'd like to to make a Singleton object in PHP4. > I'm trying to use a static variable in a function to do that

[PHP] Singleton

2001-10-23 Thread Victor Hugo Oliveira
I'd like to to make a Singleton object in PHP4. I'm trying to use a static variable in a function to do that. Every time I use the reload in the Browser client, the file doesn't seem to keep the information (I kind of expected that). I could think only 2 ways to do t