» Details |
---|
|
» Comment |
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. |