Jackalope\ObjectManager::rollbackTransaction PHP Method

rollbackTransaction() public method

TODO: Make sure AccessDeniedException is thrown by the transport if corresponding problems occur TODO: restore the in-memory state as it would be if save() was never called during the transaction. The save() method will need to track some undo information for this to be possible.
public rollbackTransaction ( )
    public function rollbackTransaction()
    {
        $this->transport->rollbackTransaction();
        $this->notifyItems('rollbackTransaction');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  *
  * TODO: Make sure RollbackException and AccessDeniedException are thrown
  * by the transport if corresponding problems occur
  *
  * @api
  */
 public function rollback()
 {
     if (!$this->inTransaction) {
         throw new LogicException("No transaction to rollback.");
     }
     $this->objectManager->rollbackTransaction();
     $this->inTransaction = false;
 }