ID:              39104
 User updated by: dave at dgx dot cz
 Reported By:     dave at dgx dot cz
 Status:          Bogus
 Bug Type:        SPL related
 PHP Version:     5.2.0RC5
 New Comment:

> And there is a big difference if a public method gets redeclared,
because it would be executed in the scope of the class where it was
executed.

Thank you for explain Tony, it makes sense.


Previous Comments:
------------------------------------------------------------------------

[2006-10-13 10:45:20] [EMAIL PROTECTED]

>ReflectionProperty::getDeclaringClass()->getName() -> Foo
>ReflectionMethod::getDeclaringClass()->getName() -> Extended

>Both property and method are declared in Foo and
>redeclared in Extended.
There is no difference whether a public property was declared in the
parent or in the child - in both cases it exists in the lists of
properties of both classes.
And there is a big difference if a public method gets redeclared,
because it would be executed in the scope of the class where it was
executed.
This scope is used as the "declaring class".
So it is expected, yes.

The second problem is assigned to me, no need to create another report
about it.

------------------------------------------------------------------------

[2006-10-13 06:59:01] dave at dgx dot cz

.

------------------------------------------------------------------------

[2006-10-10 10:51:14] dave at dgx dot cz

Expected??

1)

ReflectionProperty::getDeclaringClass()->getName() -> Foo
ReflectionMethod::getDeclaringClass()->getName() -> Extended

Both property and method are declared in Foo and redeclared in
Extended.

2) How can I detect that private method is declared in reflected class,
and not in any parent class?

------------------------------------------------------------------------

[2006-10-10 10:44:47] [EMAIL PROTECTED]

Expected behaviour.

------------------------------------------------------------------------

[2006-10-10 09:52:22] dave at dgx dot cz

The behaviour is still the same.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39104

-- 
Edit this bug report at http://bugs.php.net/?id=39104&edit=1

Reply via email to