RE: [PHP-DEV] Native Singleton Implementation

2007-03-13 Thread scott.mcnaught
n Bergmann [mailto:[EMAIL PROTECTED] > Sent: Sunday, 11 March 2007 8:26 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Native Singleton Implementation > [EMAIL PROTECTED] wrote: >> Yes! Moving the singleton functionality into core php. Its an excellent >> OOP feat

Re: [PHP-DEV] Native Singleton Implementation

2007-03-13 Thread Marcus Boerger
TECTED] > Sent: Sunday, 11 March 2007 8:26 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Native Singleton Implementation > [EMAIL PROTECTED] wrote: >> Yes! Moving the singleton functionality into core php. Its an excellent >> OOP feature. > Besides the obvi

RE: [PHP-DEV] Native Singleton Implementation

2007-03-12 Thread scott.mcnaught
force one particular method is just too >> short sighted for my taste. > > You can always still implement the variations using php. All Im proposing > is a simple mechanism for implementing single instance classes. I think > everyone needs to use this. > >> >> -- >> T

RE: [PHP-DEV] Native Singleton Implementation

2007-03-12 Thread scott.mcnaught
stance for just the current php instance / request. Definitely something to consider. -Original Message- From: Sebastian Bergmann [mailto:[EMAIL PROTECTED] Sent: Sunday, 11 March 2007 8:26 PM To: internals@lists.php.net Subject: Re: [PHP-DEV] Native Singleton Implementation [EMAIL PROTECTE

Re: [PHP-DEV] Native Singleton Implementation

2007-03-11 Thread Sebastian Bergmann
[EMAIL PROTECTED] wrote: > Yes! Moving the singleton functionality into core php. Its an excellent > OOP feature. Besides the obvious implementation considerations (should the Singleton object be unique in a single PHP instance or across "all" PHP instances, etc.), I am very much against puttin

Re: [PHP-DEV] Native Singleton Implementation

2007-03-11 Thread Tony Marston
is nasty to duplicate the singleton >>>>> pattern >>>>> for each class, (or worse, work with strings for class names). >>>>> >>>>> - From the presentation layer, it is ugly to work with the data access >>>>> singletons. >>>

Re: [PHP-DEV] Native Singleton Implementation

2007-03-10 Thread scott . mcnaught
mplement the variations using php. All Im proposing is a simple mechanism for implementing single instance classes. I think everyone needs to use this. > > -- > Tony Marston > http://www.tonymarston.net > http://www.radicore.org > >> >> -Original Message- &g

Re: [PHP-DEV] Native Singleton Implementation

2007-03-10 Thread Tony Marston
ql/singleton.html#global.helper.with.loade > r) > and I see absolutely no advantage in the method which you propose. Putting > this into core PHP would be of no benefit to anyone. > > -- > Tony Marston > http://www.tonymarston.net > http://www.radicore.org > >> Scott >>

RE: [PHP-DEV] Native Singleton Implementation

2007-03-10 Thread scott.mcnaught
hinting in IDEs - Simplicity - Encourages good coding practices for amateur programmers -Original Message- From: Tony Marston [mailto:[EMAIL PROTECTED] Sent: Saturday, 10 March 2007 9:55 PM To: internals@lists.php.net Subject: Re: [PHP-DEV] Native Singleton Implementation <[EMAIL PR

Re: [PHP-DEV] Native Singleton Implementation

2007-03-10 Thread Tony Marston
; Scott > > -Original Message- > From: Tony Marston [mailto:[EMAIL PROTECTED] > Sent: Friday, 9 March 2007 11:39 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Native Singleton Implementation > > > <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTE

RE: [PHP-DEV] Native Singleton Implementation

2007-03-09 Thread scott.mcnaught
PM To: internals@lists.php.net Subject: Re: [PHP-DEV] Native Singleton Implementation <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Greg, > > There is no reason why you can't still use the current method to implement > your variations to the singleton de

Re: [PHP-DEV] Native Singleton Implementation

2007-03-09 Thread Tony Marston
bout what > architecture is better etc. I am just showing an example. > > Scott > > -Original Message- > From: Gregory Beaver [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 6 March 2007 4:12 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED]; 'Guilherme Blanco&

Re: [PHP-DEV] Native Singleton Implementation

2007-03-07 Thread Richard Quadling
On 07/03/07, Peter Hodge <[EMAIL PROTECTED]> wrote: There's plenty of room to improve PHP's OO capabilities for PHP6, and singletons are a good start. regards, Peter Like discrete setters and getters to allow for read/write, readonly and writeonly properties. I know this has been discussed e

RE: [PHP-DEV] Native Singleton Implementation

2007-03-06 Thread Peter Hodge
room to improve PHP's OO capabilities for PHP6, and singletons are a good start. regards, Peter > Scott > > > -Original Message- > From: Peter Hodge [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 6 March 2007 3:55 PM > To: [EMAIL PROTECTED]; 'G

RE: [PHP-DEV] Native Singleton Implementation

2007-03-06 Thread scott.mcnaught
dge [mailto:[EMAIL PROTECTED] Sent: Tuesday, 6 March 2007 3:55 PM To: [EMAIL PROTECTED]; 'Guilherme Blanco' Cc: internals@lists.php.net Subject: RE: [PHP-DEV] Native Singleton Implementation Also posted in the bug report: Perhaps some nicer solutions to your got-cha's: - What ha

RE: [PHP-DEV] Native Singleton Implementation

2007-03-06 Thread scott.mcnaught
March 2007 4:12 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; 'Guilherme Blanco'; internals@lists.php.net Subject: Re: [PHP-DEV] Native Singleton Implementation Peter Hodge wrote: > You should just need to: > - add T_SINGLETON to the parser. > - add an is_singleton flag

Re: [PHP-DEV] Native Singleton Implementation

2007-03-05 Thread Gregory Beaver
Peter Hodge wrote: > You should just need to: > - add T_SINGLETON to the parser. > - add an is_singleton flag for class definitions, activated by T_SINGLETON. > - overload the 'new' operator to retrieve from the hash table if the class is > a > singleton (otherwise call __construct() as normal). >

RE: [PHP-DEV] Native Singleton Implementation

2007-03-05 Thread Peter Hodge
k read over again :) > > > -Original Message- > From: Guilherme Blanco [mailto:[EMAIL PROTECTED] > Sent: Monday, 5 March 2007 6:21 AM > To: [EMAIL PROTECTED] > Cc: internals@lists.php.net > Subject: Re: [PHP-DEV] Native Singleton Implementation > > Hi, &g

RE: [PHP-DEV] Native Singleton Implementation

2007-03-04 Thread scott.mcnaught
gs.php.net/bug.php?id=39946) and they both have drawbacks. Hmm... give the bug report a quick read over again :) -Original Message- From: Guilherme Blanco [mailto:[EMAIL PROTECTED] Sent: Monday, 5 March 2007 6:21 AM To: [EMAIL PROTECTED] Cc: internals@lists.php.net Subject: Re: [PHP-D

Re: [PHP-DEV] Native Singleton Implementation

2007-03-04 Thread Guilherme Blanco
Hi, The idea behing a native singleton class implementation should be really handy, but this is fairly simple to achieve. Take a look at PHP documentation to see some patterns implementation: http://www.php.net/manual/en/language.oop5.patterns.php I hope this helps. Best regards, On 3/4/07,