选择语言 :

 Module_Database_Driver::transaction

获取事务对象

Database_Transaction Module_Database_Driver::transaction( )
返回值
  • Database_Transaction
File: ./modules/database/driver.class.php
public function transaction()
{
    $tr_name = 'Database_Driver_'.$this->config['type'].'_Transaction';

    if (!class_exists($tr_name, true))
    {
        throw new Exception(__('the transaction of :driver not exist.', array(':driver'=>$this->config['type'])));
    }

    return new $tr_name($this);
}