TransactionManagerInterface.php 666 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Model\ResourceModel\Db;
  7. use Magento\Framework\DB\Adapter\AdapterInterface as Connection;
  8. /**
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface TransactionManagerInterface
  13. {
  14. /**
  15. * Start transaction
  16. *
  17. * @param Connection $connection
  18. * @return Connection
  19. */
  20. public function start(Connection $connection);
  21. /**
  22. * Commit transaction
  23. *
  24. * @return void
  25. */
  26. public function commit();
  27. /**
  28. * Rollback transaction
  29. *
  30. * @return void
  31. */
  32. public function rollBack();
  33. }