Re: Re: [PEPr] Comment on Networking::Net_Nmap

From: Date: Mon, 10 Mar 2008 14:39:18 +0000
Subject: Re: Re: [PEPr] Comment on Networking::Net_Nmap
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49358@lists.php.net to get a copy of this message
On Mon, Mar 10, 2008 at 3:22 PM, Luca Corbo <lu.corbo@gmail.com> wrote: > > Nice code, works well for me :) > > Thanks ;-) > > > > > > I would just remove the getters/setters in Net_Nmap_Service and > > Net_Nmap_Host (for this one maybe __get() and __set() would help), but > > that's just a matter of taste. > > I'm agree with you, less code to write, but I have a question about this > :-). > At first I have tried to use __get() and __set() methods for the Service and > Host objects because they are two simply containers, but defining all > properties as private they are not visible in the auto generated API with > PHPdoc and this seems to me not very clear for the final users and I prefer > to use the traditional set and get method for all properties. > There is a way to allows PHPdoc to autogenerate the info about properties or > I'm missing something :-)? > You need @property(-get, -set) and maybe @method, etc.. There is a set of dedicated tags for the magic stuff. Till

« previous php.pear.dev (#49358) next »