public function rollback( $transaction )
    {
        $status = $this->getStatus( $transaction);
        if( count($status) !== 1 ) {
            throw new \LogicException("You can't rollback more than 1 transaction");
        }

        list( $transaction, $transactionStatus ) = each( $status );

        // rollback things which were attempted
        foreach( $transactionStatus as $key => $taskStatus ) {
            if( $taskStatus === self::SUCCESS ) {
                $this->status[$transaction][$key] = self::ROLLEDBACK;
            }
        }

    }
public function rollback( $transaction )
    {
        $status = $this->getStatus( $transaction);
        if( count($status) !== 1 ) {
            throw new \LogicException("You can't rollback more than 1 transaction");
        }

        list( $transaction, $transactionStatus ) = each( $status );

        // rollback things which were attempted
        foreach( $transactionStatus as $key => $taskStatus ) {
            if( $taskStatus === self::SUCCESS ) {
                $this->status[$transaction][$key] = self::ROLLEDBACK;
            }
        }

    }
public function rollback ( $ transaction ) { $ status = $ this -> getStatus ( $ transaction ) ; if ( count ( $ status ) !== 1 ) { throw new \ LogicException ( "You can't rollback more than 1 transaction" ) ; } list ( $ transaction , $ transactionStatus ) = each ( $ status ) ; // rollback things which were attempted foreach ( $ transactionStatus as $ key => $ taskStatus ) { if ( $ taskStatus === self :: SUCCESS ) { $ this -> status [ $ transaction ] [ $ key ] = self :: ROLLEDBACK ; } } }
Rollback a named transaction
@param <type> $transaction
Rollback a named transaction