transaction() публичный Метод

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
Результат boolean
Пример #1
0
 /**
  * Transaction fail
  * @expectedException \Bluz\Db\Exception\DbException
  */
 public function testTransactionInvalidCallbackThrowException()
 {
     $this->db->transaction('foo');
 }