Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.6

Request #17539 $nicServer on _connect() should be optional
Submitted: 2010-07-01 14:28 UTC
From: hm2k Assigned: kguest
Status: Assigned Package: Net_Whois (version SVN)
PHP Version: 5.3.2 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2010-07-01 14:28 UTC] hm2k (James Wade)
Description: ------------ $nicServer on _connect() should be optional. This is because by default it should know to use the default NICHOST. Secondly a NicServer variable should not be required to be passed directly to the function, instead it should use the class variable unless $nicServer is specified. Consequently, the query() function should utilise this method, meaning the current whois server would be accessible via the $this->nicServer class variable. Unfortunately the _connect() function asks for the server parameter first before the actual query, which may lead to confusion. To resolve this, the _connect($nicServer, $domain) function could become _lookup($query, $server) and _connect could be mapped to it.

Comments

 [2010-07-06 15:50 UTC] hm2k (James Wade)
This would also be useful for calculating and limiting connections to whois servers.
 [2010-07-31 04:38 UTC] kguest (Ken Guest)
-Assigned To: +Assigned To: kguest
 [2010-07-31 04:41 UTC] kguest (Ken Guest)
-Status: Assigned +Status: Bogus
Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. while this is true, _connect is signaled as a private method (note the singular leading underscore in the name of this method) and so shouldn't be accessed outside of the class anyway. For that reason it doesn't matter what order the parameters for _connect are in - neither the parameters nor the method itself should not be accessed "publically"/outside of the class.
 [2010-07-31 20:23 UTC] hm2k (James Wade)
-Status: Bogus +Status: Open
If it is a private function, it should be declared as such, by using "private function", instead of just "function". However, declaring that the function is private does not mean the feature request is bogus. The server that the script connected to should be accessible, regardless of whether the function is private or public.
 [2010-10-21 16:57 UTC] hm2k (James Wade)
I think it would be useful to allow the server to be set in the same was that the port is set, don't you think? That way, at any point in time you can call the server variable to see which server it is connected to. Hope this helps to clarify.