TransactionOperationSet
in package
implements
IteratorAggregate
The Transaction Object Set class
This class is about a transaction with multiple operation for an adapter
Tags
Table of Contents
Interfaces
- IteratorAggregate
Properties
- $operations : array<string|int, TransactionOperation>
- List of operation in this set
- $sqlAdapter : AbstractSqlAdapter
- The SQL Adapter to use
Methods
- __construct() : mixed
- Constructor
- add() : void
- Add an operation to this set
- getIterator() : Traversable
- getSqlAdapter() : AbstractSqlAdapter
- Get the SQL Adapter
- save() : void
- Try to apply operations
- runOperations() : void
- Run operation, these will be applied into DBMS
- validateOperations() : void
- Validate operations, before applying
Properties
$operations
List of operation in this set
protected
array<string|int, TransactionOperation>
$operations
= []
$sqlAdapter
The SQL Adapter to use
protected
AbstractSqlAdapter
$sqlAdapter
Methods
__construct()
Constructor
public
__construct(AbstractSqlAdapter $sqlAdapter) : mixed
Parameters
- $sqlAdapter : AbstractSqlAdapter
add()
Add an operation to this set
public
add(TransactionOperation $operation) : void
Parameters
- $operation : TransactionOperation
getIterator()
public
getIterator() : Traversable
Return values
TraversablegetSqlAdapter()
Get the SQL Adapter
public
getSqlAdapter() : AbstractSqlAdapter
Return values
AbstractSqlAdaptersave()
Try to apply operations
public
save() : void
runOperations()
Run operation, these will be applied into DBMS
protected
runOperations() : void
validateOperations()
Validate operations, before applying
protected
validateOperations() : void