Roman Borschel schrieb:
> i created 2 patches that are attached to this mail
Your attachments did not make it to the list. No worries, though, I
committed a patch together with updated tests earlier.
--
Sebastian BergmannCo-Founder and Principal Consultant
http://sebastian-
Hi,
i created 2 patches that are attached to this mail, one to fix the
issue and the other to add tests for it (I added them into
reflectionProperty_setAccessible.phpt).
Roman
On Apr 4, 2009, at 1:23 PM, Johannes Schlüter wrote:
On Sat, 2009-04-04 at 13:08 +0200, Roman Borschel w
On Sat, 2009-04-04 at 13:08 +0200, Roman Borschel wrote:
> My "patch" is simply to replace the first argument of
> zend_update_property/zend_read_property in ext/php_reflection.c like
> this:
[...]
> So simply replacing Z_OBJCE_P(object) with ref->ce.
yes, that was what i was thinking about, t
Johannes Schlüter schrieb:
> This really looks like a bug in this feature.
I will have a look at it this afternoon.
--
Sebastian BergmannCo-Founder and Principal Consultant
http://sebastian-bergmann.de/ http://thePHP.cc/
--
PHP Internals - PHP Ru
On Sat, 2009-04-04 at 07:34 +0200, Roman Borschel wrote:
> Thanks for your answer. Yes, this works, but here $f is an instance of
> Foo, not Bar. When you make it an instance of Bar you get NULL. I
> think this is not correct, is it?
> Given that we have a ReflectionProperty of class Foo at han
Hi,
Despite my almost non-existant C-skills I managed to put together a
"patch" (or what I think is a patch) that does not break any tests.
My "patch" is simply to replace the first argument of
zend_update_property/zend_read_property in ext/php_reflection.c like
this:
within the getValu
For what it matters, the same thing in Java returns the expected result:
Class clazz = Foo.class;
Field fooProp = clazz.getDeclaredField("foo");
fooProp.setAccessible(true);
Bar bar = new Bar();
String value = (String)fooProp.get(bar);
System.out.println(value);
So is this a bug or some weird be
Hi,
On Apr 4, 2009, at 1:53 AM, Johannes Schlüter wrote:
On Fri, 2009-04-03 at 22:37 +0200, Roman Borschel wrote:
Given the following simple classes
class Foo {
private $foo = 'value';
public function getFoo() { return $this->foo; }
}
class Bar extends Foo {}
Obviously, given an inst
On Fri, 2009-04-03 at 22:37 +0200, Roman Borschel wrote:
> Given the following simple classes
>
> class Foo {
> private $foo = 'value';
> public function getFoo() { return $this->foo; }
> }
> class Bar extends Foo {}
>
> Obviously, given an instance of Bar, say $bar, $bar->getFoo() retu
Hello,
Sorry late replies shouldn't be allowed ;)
class A { private $foo = 2; }
class B extends A { }
$b = new B;
$b->foo = 3; // Allowed already, it will create a public property foo in $b
--
Etienne Kneuss
http://www.colder.ch
Men never do evil so completely and cheerfully as
when they do it
Hello,
On Dec 1, 2007 9:38 PM, Richard Quadling <[EMAIL PROTECTED]> wrote:
> On 01/12/2007, Jingcheng Zhang <[EMAIL PROTECTED]> wrote:
> > Well, yes, "private" denies accessing from other class(including its
> child
> > class), this is what "encapsulation" means. But when refering to
> > inherita
Jingcheng Zhang wrote:
> Well, yes, "private" denies accessing from other class(including its child
> class), this is what "encapsulation" means. But when refering to
> inheritance, why forbids private properties/methods being *extended* to
> child classes? This is what I mean, as the following exa
On 01/12/2007, Jingcheng Zhang <[EMAIL PROTECTED]> wrote:
> Well, yes, "private" denies accessing from other class(including its child
> class), this is what "encapsulation" means. But when refering to
> inheritance, why forbids private properties/methods being *extended* to
> child classes? This i
Well, yes, "private" denies accessing from other class(including its child
class), this is what "encapsulation" means. But when refering to
inheritance, why forbids private properties/methods being *extended* to
child classes? This is what I mean, as the following example:
foo = 'FOO';// Corre
Hello,
On Nov 30, 2007 5:24 PM, Jingcheng Zhang <[EMAIL PROTECTED]> wrote:
> Hi Etienne,
> Is "private" only an access limiter between classes?If so, I think
> private
> properties and methods should be OK to be extended into the child class,
> but
> currently that's not the case,
You're descr
Hi,
On Sat, 2007-12-01 at 00:24 +0800, "Jingcheng Zhang" wrote:
> Hi Etienne,
> Is "private" only an access limiter between classes?If so, I think private
> properties and methods should be OK to be extended into the child class, but
> currently that's not the case, and there is also a bug here,
Hi Etienne,
Is "private" only an access limiter between classes?If so, I think private
properties and methods should be OK to be extended into the child class, but
currently that's not the case, and there is also a bug here, consider the
following example:
name;
}
}
$o = new C();
var_dump($o
Hello,
On 11/30/07, Marco Kaiser <[EMAIL PROTECTED]> wrote:
>
> Conclusion:
> 1. Why i can access a private property from a different class instance
> (name) but same type ?
> $aa and $bb are instances of aaa but not the same.
> 2. This doesnt works if cc is a own class with same property name (ie
18 matches
Mail list logo