Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Model
ResourceModel
Db
TransactionManager.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Model\ResourceModel\Db
;
8
9
use
Magento\Framework\DB\Adapter\AdapterInterface
as Connection;
10
11
class
TransactionManager
implements
TransactionManagerInterface
12
{
16
protected
$participants
;
17
21
public
function
start
(Connection
$connection
)
22
{
23
$this->participants[] =
$connection
;
24
$connection
->beginTransaction();
25
return
$connection
;
26
}
27
31
public
function
commit
()
32
{
34
while
(
$connection
= array_pop($this->participants)) {
35
$connection
->commit();
36
}
37
}
38
42
public
function
rollBack
()
43
{
45
while
(
$connection
= array_pop($this->participants)) {
46
$connection
->rollBack();
47
}
48
}
49
56
protected
function
getConnectionKey
(Connection
$connection
)
57
{
58
return
spl_object_hash(
$connection
);
59
}
60
}
Magento\Framework\Model\ResourceModel\Db\TransactionManager
Definition:
TransactionManager.php:11
Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface\commit
commit()
Magento\Framework\Model\ResourceModel\Db\TransactionManager\$participants
$participants
Definition:
TransactionManager.php:16
Magento\Framework\Model\ResourceModel\Db
Definition:
AbstractDb.php:6
Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface
Definition:
TransactionManagerInterface.php:14
Magento\Framework\Model\ResourceModel\Db\TransactionManager\start
start(Connection $connection)
Definition:
TransactionManager.php:21
Magento\Framework\Model\ResourceModel\Db\TransactionManager\getConnectionKey
getConnectionKey(Connection $connection)
Definition:
TransactionManager.php:56
Magento\Framework\DB\Adapter\AdapterInterface
Definition:
AdapterInterface.php:16
Magento\Framework\Model\ResourceModel\Db\TransactionManagerInterface\rollBack
rollBack()
$connection
$connection
Definition:
bulk.php:13