File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,9 +264,7 @@ public function commit()
264264 */
265265 protected function rollback (array $ connections )
266266 {
267- foreach ($ connections as $ connection ) {
268- $ connection ->rollback ();
269- }
267+ $ this ->rollbackTransaction ($ connections );
270268 $ this ->unloadStorageObjects ($ this ->newObjects );
271269 $ this ->unloadStorageObjects ($ this ->modifiedObjects );
272270 $ this ->unloadStorageObjects ($ this ->deletedObjects );
@@ -290,6 +288,20 @@ protected function startTransaction(array $connections)
290288 return $ this ;
291289 }
292290
291+ /**
292+ * Откатывает транзакцию для указанных соединений с БД
293+ * @param Connection[] $connections
294+ * @return $this
295+ */
296+ protected function rollbackTransaction (array $ connections )
297+ {
298+ foreach ($ connections as $ connection ) {
299+ $ connection ->rollBack ();
300+ }
301+
302+ return $ this ;
303+ }
304+
293305 /**
294306 * Фиксирует все начатые транзакции для указанных соединений с БД
295307 * @param Connection[] $connections
You can’t perform that action at this time.
0 commit comments