johmanx10 /
transaction
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | /** |
||
| 3 | * Copyright MediaCT. All rights reserved. |
||
| 4 | * https://www.mediact.nl |
||
| 5 | */ |
||
| 6 | |||
| 7 | namespace Johmanx10\Transaction; |
||
| 8 | |||
| 9 | use Johmanx10\Transaction\Exception\TransactionRolledBackExceptionInterface; |
||
| 10 | |||
| 11 | interface TransactionInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Commit the operations in the transaction. |
||
| 15 | * Roll back operations in reverse order, from the point where a throwable |
||
| 16 | * was caught. |
||
| 17 | * |
||
| 18 | * @return void |
||
| 19 | * |
||
| 20 | * @throws TransactionRolledBackExceptionInterface When the transaction was |
||
| 21 | * rolled back. |
||
| 22 | */ |
||
| 23 | public function commit(): void; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Whether the current transaction is committed successfully. |
||
| 27 | * |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public function isCommitted(): bool; |
||
| 31 | } |
||
| 32 |