Hi, Stefan,
On 3/01/11 8:16 PM, Stefan Marr wrote:
On 03 Jan 2011, at 10:04, Ben Schmidt wrote:
In this email thread you seemed to be saying that properties defined in
traits are completely ignored, but in the RFC and svn it seems to be
saying that properties in traits are not ignored, but are merged into
the class and/or trigger errors/warnings. So, which is it? Ignored or
not? Or is some aspect of them ignored and some aspect not?
The RFC was discussed on this list, and the RFC should explain what
the current state of the implementation is. So, the RFC and the
implementation are the specifications. In case they differ it has to
be fixed.
OK. So this comment from your email is outdated?:
However, at the moment it is possible to define properties in a trait:
trait Foo {
private $a;
public $foo;
}
For the moment, that information is completely ignored, thus:
class Bar {
use Foo;
}
property_exists('Bar', 'a') === false
in light of this test:
http://svn.php.net/viewvc/php/php-src/trunk/Zend/tests/traits/property002.phpt?view=markup&pathrev=306476
Maybe the only thing that was confusing is that somebody replied to an
old email?
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php