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
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
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
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
[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
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.
>>>
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
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
>>
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
; 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
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
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&
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
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
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
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
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).
>
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
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
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,
*** Sorry - forgot to change the subject ***
Hello All,
I am new to the php internals mailing list. I am a fairly experienced
programmer with a few ideas floating around. I have come from a C++ games
development background and have now moved to primarily writing in php.
One thing that I used e
21 matches
Mail list logo