YetORM\Transaction::commit PHP Method

commit() public method

public commit ( ) : void
return void
    public function commit()
    {
        if (self::$transactionCounter[$dsn = $this->getDsnKey()] === 0) {
            throw new Exception\InvalidStateException('No transaction started.');
        }
        if (--self::$transactionCounter[$dsn] === 0) {
            $this->connection->commit();
        }
    }

Usage Example

Exemplo n.º 1
0
 /** @return void */
 protected final function commit()
 {
     $this->transaction->commit();
 }