note 102781 added to language.oop5.magic
| From: | AlinPurcaru at osu1 dot php dot net | Date: | Sun, 06 Mar 2011 11:07:53 +0000 |
| Subject: | note 102781 added to language.oop5.magic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177589@lists.php.net to get a copy of this message | ||
@Sammaye
Note that in order to use isset you need to define the __isset magic method.
So in your case you should add
<?php
public function __isset($key){
return array_key_exists($key, $this->attributes);
}
?>
to the class.
----
Server IP: 212.124.37.9
Probable Submitter: 188.25.172.125
----
Manual Page -- http://www.php.net/manual/en/language.oop5.magic.php
Edit -- https://master.php.net/note/edit/102781
Del: integrated -- https://master.php.net/note/delete/102781/integrated
Del: useless -- https://master.php.net/note/delete/102781/useless
Del: bad code -- https://master.php.net/note/delete/102781/bad+code
Del: spam -- https://master.php.net/note/delete/102781/spam
Del: non-english -- https://master.php.net/note/delete/102781/non-english
Del: in docs -- https://master.php.net/note/delete/102781/in+docs
Del: other reasons-- https://master.php.net/note/delete/102781
Reject -- https://master.php.net/note/reject/102781
Search -- https://master.php.net/manage/user-notes.php