Re: [PEPr] Comment on Networking::Net_Nmap
| From: | Luca Corbo | Date: | Mon, 10 Mar 2008 14:22:46 +0000 |
| Subject: | Re: [PEPr] Comment on Networking::Net_Nmap | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49357@lists.php.net to get a copy of this message | ||
> 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 :-)?