This code was originally part of the facade, however it has been decided to remove unique features to service classes like this to make them available to developers not using the facade class.
Database transaction helper. This is a convenience class to perform a callback in a database transaction. This class contains a method to wrap your callback in a transaction.
copyright (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community This source file is subject to the BSD/GPLv2 License that is bundled with this source code in the file license.txt.
Author: Gabor de Mooij and the RedBeanPHP Community
Located at Util/Transaction.php
Wraps a transaction around a closure or string callback. If an Exception is thrown inside, the operation is automatically rolled back. If no Exception happens, it commits automatically. It also supports (simulated) nested transactions (that is useful when you have many methods that needs transactions but are unaware of each other).