transaction() public method

Example of usage $db->transaction(function() use ($db) { $db->query("INSERT INTO table ..."); $db->query("UPDATE table ..."); $db->query("DELETE FROM table ..."); })
public transaction ( callable $process ) : boolean
$process callable callable structure - closure function or class with __invoke() method
return boolean
コード例 #1
0
ファイル: DbTest.php プロジェクト: dezvell/mm.local
 /**
  * Transaction fail
  * @expectedException \Bluz\Db\Exception\DbException
  */
 public function testTransactionInvalidCallbackThrowException()
 {
     $this->db->transaction('foo');
 }