|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct ($database) | |
| get_backtrace () | |
| is_disposed () | |
| dispose () | |
| allow_commit () | |
| rollback (Exception $e) | |
Delegated transaction class.
Definition at line 33 of file moodle_transaction.php.
| __construct | ( | $ | database | ) |
Delegated transaction constructor, can be called only from moodle_database class. Unfortunately PHP's protected keyword is useless.
| moodle_database | $database |
Definition at line 43 of file moodle_transaction.php.
| allow_commit | ( | ) |
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.
Definition at line 85 of file moodle_transaction.php.

| dispose | ( | ) |
Mark transaction as disposed, no more commits and rollbacks allowed. To be used only from moodle_database class
Definition at line 71 of file moodle_transaction.php.

| get_backtrace | ( | ) |
Returns backtrace of the code starting exception.
Definition at line 53 of file moodle_transaction.php.
| is_disposed | ( | ) |
Is the delegated transaction already used?
Definition at line 61 of file moodle_transaction.php.

| rollback | ( | Exception $ | e | ) |
Rollback all current delegated transactions.
| Exception | $e | mandatory exception |
Definition at line 98 of file moodle_transaction.php.
