Ddd\Infrastructure\Application\Service\AdodbSession::executeAtomically PHP Method

executeAtomically() public method

public executeAtomically ( callable $operation )
$operation callable
    public function executeAtomically(callable $operation)
    {
        $this->connection->StartTrans();
        try {
            $outcome = $operation();
            $this->connection->CommitTrans();
            return $outcome;
        } catch (Exception $e) {
            $this->connection->RollbackTrans();
            throw $e;
        }
    }
AdodbSession