2009/11/19 Mathieu Suen mathieu.s...@easyflirt.com
Eloy Bote Falcon a écrit :
2009/11/18 Mathieu Suen mathieu.s...@easyflirt.com
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,
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
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
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
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
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:
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
Le Thu, 19 Nov 2009 12:06:19 +0100, Mathieu Suen a écrit :
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:
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
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.
Hello,
On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen mathieu.s...@easyflirt.comwrote:
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
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
Etienne Kneuss a écrit :
Hello,
On Wed, Nov 18, 2009 at 5:54 PM, Mathieu Suen mathieu.s...@easyflirt.comwrote:
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
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= $emailClass;
2009/11/18 Mathieu Suen mathieu.s...@easyflirt.com
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,
after discussing the idea with various PHP developers I now felt safe
enough that it's
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) {
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
-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 now
felt safe enough that it's not a
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 with various
Eloy Bote Falcon a écrit :
2009/11/18 Mathieu Suen mathieu.s...@easyflirt.com
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,
after discussing the idea with various PHP developers I now
20 matches
Mail list logo