Db pour enrichissement

This commit is contained in:
Michael RICOIS 2013-06-12 13:54:37 +00:00
parent c1ec8f36a9
commit d4541249f2

View File

@ -30,13 +30,18 @@ class MLiens2
*
* @param string $id
* @param string $type ref|siren
* @param Zend_Db_Adapter $db
* @throws SoapFault
*/
public function __construct($id, $type = 'ref')
public function __construct($id, $type = 'ref', $db=null)
{
//Get defaut database adapter
if( $db === null ) {
$this->db = Zend_Db_Table_Abstract::getDefaultAdapter();
} else {
$this->db = $db;
Zend_Db_Table_Abstract::setDefaultAdapter($db);
}
//Get Id
if ( $type == 'siren' ) {
$this->siren = $id;