[PEAR-DEV] [PEPr] +1 for Networking::Net_MAC
by Justin Patrin other posts by this author
Dec 13 2006 11:23AM messages near this date
[PEAR-DEV] Re: [PEPr] +1 for Networking::Net_MAC
|
[PEAR-DEV] [PEPr] +1 for Networking::Net_MAC
Justin Patrin (http://pear.php.net/user/justinpatrin) has voted +1 on the proposal for Netwo
rking::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
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Andrew Teixeira
Greg Beaver
Andrew Teixeira
Justin Patrin
Christian Weiske
Andrew Teixeira
Andrew Teixeira
Arnaud Limbourg
Justin Patrin
Andrew Teixeira
Andrew Teixeira
Andrew Teixeira
Stefan Neufeind
Arnaud Limbourg
Justin Patrin
Graham Christensen
|