Re: [PHP] Singleton with variable parameters

2010-12-15 Thread Nathan Nobbe
On Wed, Dec 15, 2010 at 2:11 PM, Sebastian Detert php-maill...@elygor.dewrote: 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

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:11 PM, Sebastian Detert php- maill

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

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

2003-10-07 Thread Andy Crain
One quick thought: You might want to add the following to your if statement: else { $this-_cache[$key] = new $key; return $this-_cache[$key]; } Andy -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED] Sent: Monday, October 06, 2003 5:36 PM To: 'PHP

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.

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 Singleton