note 117060 added to language.oop5.overloading
| From: | Anonymous | Date: | Wed, 08 Apr 2015 15:34:02 +0000 |
| Subject: | note 117060 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202214@lists.php.net to get a copy of this message | ||
Using magic methods, especially __get(), __set(), and __call() will effectively disable autocomplete
in most IDEs (eg.: IntelliSense) for the affected classes.
To overcome this inconvenience, use phpDoc to let the IDE know about these magic methods and
properties: @method, @property, @property-read, @property-write.
/**
* @property-read name
* @property-read price
*/
class MyClass
{
private $properties = array('name' => 'IceFruit', 'price' =>
2.49)
public function __get($name)
{
return $this->properties($name);
}
}
----
Server IP: 72.52.91.14
Probable Submitter: 89.133.67.220
----
Manual Page -- http://php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/117060
Del: integrated -- https://master.php.net/note/delete/117060/integrated
Del: useless -- https://master.php.net/note/delete/117060/useless
Del: bad code -- https://master.php.net/note/delete/117060/bad+code
Del: spam -- https://master.php.net/note/delete/117060/spam
Del: non-english -- https://master.php.net/note/delete/117060/non-english
Del: in docs -- https://master.php.net/note/delete/117060/in+docs
Del: other reasons-- https://master.php.net/note/delete/117060
Reject -- https://master.php.net/note/reject/117060
Search -- https://master.php.net/manage/user-notes.php