note 61658 added to language.oop5.reflection
| From: | CodeDuck at gmx dot net | Date: | Wed, 08 Feb 2006 16:07:47 +0000 |
| Subject: | note 61658 added to language.oop5.reflection | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103318@lists.php.net to get a copy of this message | ||
Beware, the Reflection reflects only the information right after compile time based on the
definitions, not based on runtime objects. Might be obvious, wasn't for me, until the app
throws the exception at my head.
Example:
<?php
class A {
public $a = null;
function set() {
$this->foo = 'bar';
}
}
$a = new A;
$a->set();
// works fine
$Reflection = new ReflectionProperty($a, 'a');
// throws exception
$Reflection = new ReflectionProperty($a, 'foo');
?>
----
Server IP: 217.13.201.10
Probable Submitter: 81.14.224.103
----
Manual Page -- http://www.php.net/manual/en/language.oop5.reflection.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61658
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61658&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61658&report=yes
Search -- http://master.php.net/manage/user-notes.php