>>> 16:07
>>>> To: internals@lists.php.net
>>>> Subject: [PHP-DEV] RFC: Custom Factories (SPL)
>>>>
>>>> Hi folks,
>>>>
>>>> after discussing the idea with various PHP developers I now felt safe
>>>> enough t
Ionut G. Stan a écrit :
One could just as well pass an instance of Emailer to the constructor.
It's the same thing, except that it's less code (and it's easier to
understand in my opinion).
That is type 3 IoC.
It's a basic application of the Law of Demeter.
I don't see the point with "th
One could just as well pass an instance of Emailer to the constructor.
It's the same thing, except that it's less code (and it's easier to
understand in my opinion).
It's a basic application of the Law of Demeter.
On 11/18/2009 7:19 PM, Mathieu Suen wrote:
Right!!
I get confused with:
$class
It will work, just in a very complicated way. Emailer would need to have
access to some other global variables in order to resolve its dependencies.
My point is that they are globals.
On 11/19/2009 4:57 PM, Mathieu Suen wrote:
Ionut G. Stan a écrit :
This smells like metaclasses to me, just t
Ionut G. Stan a écrit :
This smells like metaclasses to me, just that in your RFC they are
supposed to work on a global level, not on a per class level.
Python, for example, has a magic method called `__new__`, which controls
the creation of the object whenever a new class is instantiated. It
This smells like metaclasses to me, just that in your RFC they are
supposed to work on a global level, not on a per class level.
Python, for example, has a magic method called `__new__`, which controls
the creation of the object whenever a new class is instantiated. It
actually allows you to r
Hello here!
I'm a big fan of IoC too, and I think that PHP devs really need to have a
look into Inversion of control. Adding this feature to PHP can be useful for
providing a simple way to detect and manage the object creation process.
The "spl_factory_register" function allows to specify a manne
Alban a écrit :
Le Thu, 19 Nov 2009 02:24:01 +, Jared Williams a écrit :
-Original Message-
From: Robert Lemke [mailto:rob...@typo3.org] Sent: 18 November 2009
16:07
To: internals@lists.php.net
Subject: [PHP-DEV] RFC: Custom Factories (SPL)
Hi folks,
after discussing the idea
2009/11/19 Mathieu Suen
> Eloy Bote Falcon a écrit :
>
> 2009/11/18 Mathieu Suen
>>
>> Etienne Kneuss a écrit :
>>>
>>> Hello,
>>>
On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen <
mathieu.s...@easyflirt.com
> wrote:
>
Robert Lemke a écrit :
> Hi folks,
>
Eloy Bote Falcon a écrit :
2009/11/18 Mathieu Suen
Etienne Kneuss a écrit :
Hello,
On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen
wrote:
Robert Lemke a écrit :
Hi folks,
after discussing the idea with various PHP developers I now felt safe
enough that it's not a completely stupid idea t
Le Thu, 19 Nov 2009 02:24:01 +, Jared Williams a écrit :
>> -Original Message-
>> From: Robert Lemke [mailto:rob...@typo3.org] Sent: 18 November 2009
>> 16:07
>> To: internals@lists.php.net
>> Subject: [PHP-DEV] RFC: Custom Factories (SPL)
>>
>
> -Original Message-
> From: Robert Lemke [mailto:rob...@typo3.org]
> Sent: 18 November 2009 16:07
> To: internals@lists.php.net
> Subject: [PHP-DEV] RFC: Custom Factories (SPL)
>
> Hi folks,
>
> after discussing the idea with various PHP developers I n
what you call factory objects are "more" proxy objects, please make
the difference, semantics are sometimes important.
anyway , what I can read this document is a bit a mess, it needs to be
split by "topic", your approach is really confuse.
Best,
On Wed, Nov 18, 2009 at 8:06 AM, Robert Lemke wr
Hi!
Here is the first draft of my RFC:
http://wiki.php.net/rfc/customfactories
Something I'm missing in this RFC: what's wrong with factory base class
doing:
public static function getInstance() {
if(static::$instance === NULL) {
static::$inst
2009/11/18 Mathieu Suen
> Etienne Kneuss a écrit :
>
> Hello,
>>
>> On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen > >wrote:
>>
>> Robert Lemke a écrit :
>>>
>>> Hi folks,
>>>
after discussing the idea with various PHP developers I now felt safe
enough that it's not a completely stupid
Hi Mathieu,
Am 18.11.2009 um 18:19 schrieb Mathieu Suen:
> Right!!
> I get confused with:
> $classNamme::getInstance();
>
> So you can easily inject dependency:
>
> class Foo {
>
> protected $emailer;
>
> public function __construct($emailClass) {
> $this->emailer= $
Etienne Kneuss a écrit :
Hello,
On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen wrote:
Robert Lemke a écrit :
Hi folks,
after discussing the idea with various PHP developers I now felt safe
enough that it's not a completely stupid idea to post an RFC for it. The
idea is to add support the reg
Hi Alexey,
Am 18.11.2009 um 17:27 schrieb Alexey Zakhlestin:
> So, from the high-level point of view, you want to introduce mechanism, which
> would allow instantiate objects by their interface, instead of their
> class-name.
> And this mechanism should use user-provided rules for choosing appr
Hello,
On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen wrote:
> Robert Lemke a écrit :
>
> Hi folks,
>>
>> after discussing the idea with various PHP developers I now felt safe
>> enough that it's not a completely stupid idea to post an RFC for it. The
>> idea is to add support the registration of
Robert Lemke a écrit :
Hi folks,
after discussing the idea with various PHP developers I now felt safe enough
that it's not a completely stupid idea to post an RFC for it. The idea is to
add support the registration of custom factories which are responsible for
instantiating certain classes.
On 18.11.2009, at 19:06, Robert Lemke wrote:
> Hi folks,
>
> after discussing the idea with various PHP developers I now felt safe enough
> that it's not a completely stupid idea to post an RFC for it. The idea is to
> add support the registration of custom factories which are responsible for
Hi folks,
after discussing the idea with various PHP developers I now felt safe enough
that it's not a completely stupid idea to post an RFC for it. The idea is to
add support the registration of custom factories which are responsible for
instantiating certain classes.
Here is the first draft
22 matches
Mail list logo