Re: PHPDoc way to describe the magic getter/setters [SOLVED]

From: Date: Wed, 25 Sep 2013 23:37:47 +0000
Subject: Re: PHPDoc way to describe the magic getter/setters [SOLVED]
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-322195@lists.php.net to get a copy of this message
On Wed, Sep 25, 2013 at 4:31 PM, Daevid Vincent <daevid@daevid.com> wrote: > Then I randomly stumbled upon this PHPDoc @ method tag and my whole world > is brighter today than it has been for the past, oh let's say DECADE! Yes, @method and @property are very handy. Out of curiosity, since you're providing magic getters and setters, why not use __get and __set instead of __call with matching on "get_xxx" and "set_xxx"? This would allow using the simpler (and IMHO much more expressive and PHP-ish) forms $obj->foo = $obj->bar + 5; Peace, David

« previous php.general (#322195) next »