Пример #1
0
 /**
  * @param Sabel_Db_Driver $driver
  *
  * @throws Sabel_Db_Exception_Connection
  * @return void
  */
 public static function connect(Sabel_Db_Driver $driver)
 {
     if (Sabel_Db_Transaction::isActive()) {
         $connectionName = $driver->getConnectionName();
         if ($connection = Sabel_Db_Transaction::getConnection($connectionName)) {
             $driver->setConnection($connection);
         } else {
             Sabel_Db_Transaction::begin(self::_connect($driver));
         }
         $driver->autoCommit(false);
     } else {
         self::_connect($driver);
     }
 }