[PEPr] Comment on Networking::Net_Presence
| From: | PEPr | Date: | Tue, 13 Apr 2004 03:40:54 +0000 |
| Subject: | [PEPr] Comment on Networking::Net_Presence | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-27519@lists.php.net to get a copy of this message | ||
Greg Beaver (http://pear.php.net/user/cellog) has commented on the proposal for
Networking::Net_Presence.
Comment:
Cool package, will definitely be useful.
Some details:
- it installs to Net/Presence/Presence.php, but should install to Net/Presence.php
- URLs to IM services should *not* be hard-coded, what if they change?
- NET_PRESENCE_MODE_* constants seem unnecessary, you could add new IM services without upgrading
through the use of text indexes "aim", "msn" etc. Just document the available
ones, and allow a simple plugin mechanism for new ones.
I'd recommend not using a switch, instead try
$method = 'get' . $medium;
if (method_exists($this, $method)) {
$return = $this->$method($uid)
}
and define methods getAIM(), getMSN(), getYahoo(), etc.
My last request is could you provide the possibility to do other useful IM functions in the future
so it isn't a 1-function wonder?
This would allow name change to Net_IMInfo, both more understandable and shorter to type.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=50
--
Sent by PEPr, the automatic proposal system at http://pear.php.net