[PEPr] Comment on Networking::AsteriskManager
| From: | David Jean Louis | Date: | Sat, 22 Mar 2008 18:43:24 +0000 |
| Subject: | [PEPr] Comment on Networking::AsteriskManager | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49503@lists.php.net to get a copy of this message | ||
David Jean Louis (http://pear.php.net/user/izi) has commented on the proposal for
Networking::AsteriskManager.
Comment:
That's better !
some notes:
* you should definitively check keys of you constructor $params, and make
it optional, something like:
function __construct($params = array()) {
if (isset($params['key'])) {
$this->key = $params['key'];
}
// ditto for other params...
}
because someone could do:
$asterisk = new Net_AsteriskManager();
$asterisk->server = 'example.com';
* I found some typos in various methods: $reponse vs $response. It would
be cool to start writing some simple unit tests btw ;)
And to be picky:
* There are still un-needed if / else,
* Your file level comment for the licence is weird (3 *** and a line
feed),
* maybe an 'autoconnect' key in the $params array would be handy to have,
if set to true the constructor calls the connect() stuff
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=543
--
Sent by PEPr, the automatic proposal system at http://pear.php.net