Re: [PEPr] +1 for Networking::Net_MAC
| From: | Andrew Teixeira | Date: | Wed, 13 Dec 2006 17:39:42 +0000 |
| Subject: | Re: [PEPr] +1 for Networking::Net_MAC | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-45193@lists.php.net to get a copy of this message | ||
I will make the changes to my copy and either clarify the
constructor/factory problem or do away with the factory completely in
favor of exceptions with the constructor. I wasn't aware exceptions
could be thrown from the constructor...my oversight.
I will also remove raiseError calls in favor of exceptions in the rest
of the code per advice from Arnaud.
On 13 Dec 2006 16:52:53 -0000, Christian Weiske <cweiske@php.net> wrote:
Christian Weiske (http://pear.php.net/user/cweiske) has voted +1 on the proposal for Networking::Net_MAC. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=454 Vote information: http://pear.php.net/pepr/pepr-vote-show.php?id=454&handle=cweiske Comment: Please make private class vars protected unless absolutely needed. Further, I don't know from looking at the code when to use the normal constructor, and when factory(). IMO the parameters of the factory could be checked in the constructor, throwing an exception on error. By the way, PHP5 supports typed parameters so you don't have to check the type yourself: function Net_MAC(MDB2_Driver_Common $db) {} -- Sent by PEPr, the automatic proposal system at http://pear.php.net