- $this->getConnection()->commit();
- /**
- * Process after commit callbacks
- */
- if ($this->getConnection()->getTransactionLevel() === 0) {
- $connectionKey = spl_object_hash($this->getConnection());
- if (isset(self::$_commitCallbacks[$connectionKey])) {
- $callbacks = self::$_commitCallbacks[$connectionKey];
- self::$_commitCallbacks[$connectionKey] = [];
- try {
- foreach ($callbacks as $callback) {
- call_user_func($callback);
- }
- } catch (\Exception $e) {
- echo $e;
- throw $e;
- }
- }
- }