See Release Notes
Long Term Support Release
Delegated database transaction support.
Copyright: | 2009 Petr Skoda (http://skodak.org) |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 107 lines (3 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
moodle_transaction:: (6 methods):
__construct()
get_backtrace()
is_disposed()
dispose()
allow_commit()
rollback()
Class: moodle_transaction - X-Ref
Delegated transaction class.__construct($database) X-Ref |
Delegated transaction constructor, can be called only from moodle_database class. Unfortunately PHP's protected keyword is useless. param: moodle_database $database |
get_backtrace() X-Ref |
Returns backtrace of the code starting exception. return: array |
is_disposed() X-Ref |
Is the delegated transaction already used? return: bool true if commit and rollback allowed, false if already done |
dispose() X-Ref |
Mark transaction as disposed, no more commits and rollbacks allowed. To be used only from moodle_database class return: null |
allow_commit() X-Ref |
Commit delegated transaction. The real database commit SQL is executed only after committing all delegated transactions. Incorrect order of nested commits or rollback at any level is resulting in rollback of SQL transaction. return: void |
rollback($e) X-Ref |
Rollback all current delegated transactions. param: Exception|Throwable $e mandatory exception/throwable return: void |