You are here

public function Transaction::rollbackIfFalse in Transaction 5

Same name and namespace in other branches
  1. 6 transaction.module \Transaction::rollbackIfFalse()

If the given value is FALSE (value AND type), roll back the current transaction.

Parameters

boolean $var Roll back the current transaction iff TRUE.:

1 call to Transaction::rollbackIfFalse()
pressflow_transaction::rollback_if_false in ./transaction.module

File

./transaction.module, line 59
Provides a database transaction system for use with InnoDB tables in MySQL.

Class

Transaction
Provides a nestable transaction system for handling commits and rollbacks.

Code

public function rollbackIfFalse($var) {
  if ($var === FALSE) {
    $this
      ->rollback();
  }
}