-
Notifications
You must be signed in to change notification settings - Fork 14
/
TransactionHandler.php
42 lines (37 loc) · 1.01 KB
/
TransactionHandler.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
namespace Ibexa\Contracts\Core\Persistence;
/**
* The Persistence Transaction handler for Storage Engine.
*
* @since 5.3
*/
interface TransactionHandler
{
/**
* Begin transaction.
*
* Begins an transaction, make sure you'll call commit or rollback when done,
* otherwise work will be lost.
*/
public function beginTransaction();
/**
* Commit transaction.
*
* Commit transaction, or throw exceptions if no transactions has been started.
*
* @throws \RuntimeException If no transaction has been started
*/
public function commit();
/**
* Rollback transaction.
*
* Rollback transaction, or throw exceptions if no transactions has been started.
*
* @throws \RuntimeException If no transaction has been started
*/
public function rollback();
}