diff --git a/framework/db/Connection.php b/framework/db/Connection.php index f71b940..03b10a8 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -66,7 +66,7 @@ use yii\caching\Cache; * // ... executing other SQL statements ... * $transaction->commit(); * } catch(Exception $e) { - * $transaction->rollBack(); + * $transaction->rollback(); * } * ~~~ * diff --git a/framework/db/Migration.php b/framework/db/Migration.php index 88abab5..f51e597 100644 --- a/framework/db/Migration.php +++ b/framework/db/Migration.php @@ -64,14 +64,14 @@ class Migration extends \yii\base\Component $transaction = $this->db->beginTransaction(); try { if ($this->safeUp() === false) { - $transaction->rollBack(); + $transaction->rollback(); return false; } $transaction->commit(); } catch (\Exception $e) { echo "Exception: " . $e->getMessage() . ' (' . $e->getFile() . ':' . $e->getLine() . ")\n"; echo $e->getTraceAsString() . "\n"; - $transaction->rollBack(); + $transaction->rollback(); return false; } return null; @@ -89,14 +89,14 @@ class Migration extends \yii\base\Component $transaction = $this->db->beginTransaction(); try { if ($this->safeDown() === false) { - $transaction->rollBack(); + $transaction->rollback(); return false; } $transaction->commit(); } catch (\Exception $e) { echo "Exception: " . $e->getMessage() . ' (' . $e->getFile() . ':' . $e->getLine() . ")\n"; echo $e->getTraceAsString() . "\n"; - $transaction->rollBack(); + $transaction->rollback(); return false; } return null; diff --git a/framework/db/Transaction.php b/framework/db/Transaction.php index d66c38e..195a8c8 100644 --- a/framework/db/Transaction.php +++ b/framework/db/Transaction.php @@ -25,7 +25,7 @@ use yii\base\InvalidConfigException; * //.... other SQL executions * $transaction->commit(); * } catch(Exception $e) { - * $transaction->rollBack(); + * $transaction->rollback(); * } * ~~~ * @@ -42,14 +42,14 @@ class Transaction extends \yii\base\Object public $db; /** * @var boolean whether this transaction is active. Only an active transaction - * can [[commit()]] or [[rollBack()]]. This property is set true when the transaction is started. + * can [[commit()]] or [[rollback()]]. This property is set true when the transaction is started. */ private $_active = false; /** * Returns a value indicating whether this transaction is active. * @return boolean whether this transaction is active. Only an active transaction - * can [[commit()]] or [[rollBack()]]. + * can [[commit()]] or [[rollback()]]. */ public function getIsActive() {