public function beginTransaction() : bool
    {
        if ($this->dbconn->inTransaction()) {
            throw new TransactionErrorException("A transaction has already been started.");
        }
        try {
            return $this->dbconn->beginTransaction();
        } catch (\PDOException $exception) {
            throw new TransactionsNotSupportedException("Transactions are not supported in this database.");
        }
    }
public function beginTransaction() : bool
    {
        if ($this->dbconn->inTransaction()) {
            throw new TransactionErrorException("A transaction has already been started.");
        }
        try {
            return $this->dbconn->beginTransaction();
        } catch (\PDOException $exception) {
            throw new TransactionsNotSupportedException("Transactions are not supported in this database.");
        }
    }
public function beginTransaction ( ) : bool { if ( $ this -> dbconn -> inTransaction ( ) ) { throw new TransactionErrorException ( "A transaction has already been started." ) ; } try { return $ this -> dbconn -> beginTransaction ( ) ; } catch ( \ PDOException $ exception ) { throw new TransactionsNotSupportedException ( "Transactions are not supported in this database." ) ; } }
Start a transaction.

@return bool
@throws TransactionErrorException if a transaction is already started
@throws TransactionsNotSupportedException if transactions are not supported
Start a transaction .