connection = $connection; $this->level = $level; $this->parent = $parent; } /** * Register a callback to be executed after committing. * * @param callable $callback * @return void */ public function addCallback($callback) { $this->callbacks[] = $callback; } /** * Execute all of the callbacks. * * @return void */ public function executeCallbacks() { foreach ($this->callbacks as $callback) { $callback(); } } /** * Get all of the callbacks. * * @return array */ public function getCallbacks() { return $this->callbacks; } }