[PEPr] Comment on Networking::Net_SMPP_Client
| From: | Ian Eure | Date: | Sat, 23 Apr 2005 18:14:42 +0000 |
| Subject: | [PEPr] Comment on Networking::Net_SMPP_Client | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37372@lists.php.net to get a copy of this message | ||
Ian Eure (http://pear.php.net/user/ieure) has commented on the proposal for
Networking::Net_SMPP_Client.
Comment:
On Globals:
I do not have a "structure based on GLOBALS." What I have is data which an
instance of Net_SMPP_Client needs stored in two global vars. They are only
ever used for lookup; all state information is held in the object.
Moving them into the class would be wasteful, since there would be many
copies of the data (one for each instance) when only one copy is needed
for all instances. It would also make debugging harder, since they would
appear in print_r() output, but serve no useful purpose there.
On passing references:
Unfortunately, there's no way to pass a bool by value and an object by
reference. If I were to remove the &s from those functions, I would end up
copying objects all over the place.
I agree that it's a bit unconventional, but it works, and doesn't generate
any warnings under E_ALL.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=240
--
Sent by PEPr, the automatic proposal system at http://pear.php.net