[PEPr] +1 for Networking::Net_MAC

From: Date: Wed, 13 Dec 2006 19:20:21 +0000
Subject: [PEPr] +1 for Networking::Net_MAC
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-45197@lists.php.net to get a copy of this message
Justin Patrin (http://pear.php.net/user/justinpatrin) 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=justinpatrin This vote is conditional. The condition is: You need to make your own Exception class which extends PEAR_Exception. class Net_MAC_Exception extends PEAR_Exception {} and use this exception for all of your throwing. Don't throw, catch, and rethrow an exception: try { if (!is_a($db, 'MDB2_Driver_Common')) { throw new PEAR_Exception('Bad database object'); } } catch (PEAR_Exception $e) { throw $e; } The try/catch here is a no-op, it does nothing useful. There is no need for =& when setting an object in PHP5. $this->_db =& $db; changed to $this->_db = $db; You need spaces around the = sign for default parameters. static function check($input, $delimiter=':') changed to static function check($input, $delimiter = ':') require_once 'MDB2.php'; should not be needed in importVendors of findVendor. The object is already in $this->_db. -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#45197) next »