PluginProbe
Independent Analytics – WordPress Analytics Plugin / 1.28.2
Independent Analytics – WordPress Analytics Plugin v1.28.2
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 All 120 releases
independent-analytics / vendor / illuminate / database / DatabaseTransactionRecord.php
DatabaseTransactionRecord.php
68 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IAWP_SCOPED\Illuminate\Database;
4
5 class DatabaseTransactionRecord
6 {
7 /**
8 * The name of the database connection.
9 *
10 * @var string
11 */
12 public $connection;
13 /**
14 * The transaction level.
15 *
16 * @var int
17 */
18 public $level;
19 /**
20 * The callbacks that should be executed after committing.
21 *
22 * @var array
23 */
24 protected $callbacks = [];
25 /**
26 * Create a new database transaction record instance.
27 *
28 * @param string $connection
29 * @param int $level
30 * @return void
31 */
32 public function __construct($connection, $level)
33 {
34 $this->connection = $connection;
35 $this->level = $level;
36 }
37 /**
38 * Register a callback to be executed after committing.
39 *
40 * @param callable $callback
41 * @return void
42 */
43 public function addCallback($callback)
44 {
45 $this->callbacks[] = $callback;
46 }
47 /**
48 * Execute all of the callbacks.
49 *
50 * @return void
51 */
52 public function executeCallbacks()
53 {
54 foreach ($this->callbacks as $callback) {
55 \call_user_func($callback);
56 }
57 }
58 /**
59 * Get all of the callbacks.
60 *
61 * @return array
62 */
63 public function getCallbacks()
64 {
65 return $this->callbacks;
66 }
67 }
68