Hello internals,
I've just occured a syntax problem in the following script:
?php
class C {
public $n = 1;
}
$o = new C();
$o-f = function () use ($o) {
echo $o-n;
};
$o-f();
?
The result of this script is Fatal Error: Call to undefined method C::f().
I don't know this is the expected
2009/11/16 Christian Seiler chris...@gmx.net:
Hi,
since a few months have passed since the last discussion on this topic
and perhaps people had time to gather some experience with the current
closure implementation in PHP 5.3 I'd like to restart the debate on
$this in closures and object
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
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!
As for public/protected/private ...
$fn = function() use() bind() access(CLOSURE_PUBLIC |
CLOSURE_PROTECTED | CLOSURE_PRIVATE) {};
I have very hard time imagining somebody that would be comfortable using
such a construct. What happened to keeping it simple? And why every
tiniest
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) {
Hi!
I've just occured a syntax problem in the following script:
?php
class C {
public $n = 1;
}
$o = new C();
$o-f = function () use ($o) {
echo $o-n;
};
$o-f();
?
The result of this script is Fatal Error: Call to undefined method C::f().
I don't know this is the expected result.
Hello,
On Wed, Nov 18, 2009 at 11:44 AM, Stanislav Malyshev s...@zend.com wrote:
I have very hard time imagining somebody that would be comfortable using
such a construct. What happened to keeping it simple? And why every tiniest
feature of every remotest imaginable use case has to be brought
Hi!
That syntax made my eyes hurt, but I think really the problem is that
people want to dynamically add methods with $this in the closure
pointing the the object it has been attached too. Really I like A. but
We can add method to Closure class to allow that. See Closure::bind and
bindTo in
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
Hello Stanislav,
2009/11/19 Stanislav Malyshev s...@zend.com
Hi!
Yes, this is the expected result. PHP is not Javascript, sorry :) Methods
and properties are different things in PHP, so the syntax assumes you refer
to method when you call $o-f(). You could use other syntaxes if you need to
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