UpdateTransactionOperation
extends TransactionOperation
in package
The UpdateTransactionOperation class
Transaction operation to update objects in DBMS
Tags
Table of Contents
Properties
- $class : PermanentEntity>
- The class of this operation
- $data : array<string|int, mixed>
- The data to insert
- $entity : PermanentEntity
- The object of this operation
- $fields : array<string|int, string>
- Fields to restrict creation
- $isValid : bool
- If this Operation is valid
- $sqlAdapter : AbstractSqlAdapter|null
- The SQL Adapter
- $transactionOperationSet : TransactionOperationSet|null
- The transaction set
Methods
- __construct() : mixed
- Constructor
- getSqlAdapter() : AbstractSqlAdapter|null
- Get the SQL Adapter
- getTransactionOperationSet() : TransactionOperationSet
- Get the TransactionOperationSet
- isValid() : bool
- If this operation is valid
- run() : bool
- Run this operation
- runIfValid() : mixed
- Run this operation only if valid
- setSqlAdapter() : static
- Set the SQL Adapter
- setTransactionOperationSet() : static
- Set the TransactionOperationSet
- validate() : void
- Validate this operation
- setIsValid() : static
- Set this operation validity
Properties
$class
The class of this operation
protected
PermanentEntity>
$class
$data
The data to insert
protected
array<string|int, mixed>
$data
$entity
The object of this operation
protected
PermanentEntity
$entity
$fields
Fields to restrict creation
protected
array<string|int, string>
$fields
$isValid
If this Operation is valid
protected
bool
$isValid
= false
$sqlAdapter
The SQL Adapter
protected
AbstractSqlAdapter|null
$sqlAdapter
= null
$transactionOperationSet
The transaction set
protected
TransactionOperationSet|null
$transactionOperationSet
Methods
__construct()
Constructor
public
__construct(string $class, array<string|int, mixed> $data, array<string|int, string> $fields, PermanentEntity $entity) : mixed
Parameters
- $class : string
- $data : array<string|int, mixed>
- $fields : array<string|int, string>
- $entity : PermanentEntity
getSqlAdapter()
Get the SQL Adapter
public
getSqlAdapter() : AbstractSqlAdapter|null
Return values
AbstractSqlAdapter|nullgetTransactionOperationSet()
Get the TransactionOperationSet
public
getTransactionOperationSet() : TransactionOperationSet
Return values
TransactionOperationSetisValid()
If this operation is valid
public
isValid() : bool
Return values
boolrun()
Run this operation
public
run() : bool
Return values
boolrunIfValid()
Run this operation only if valid
public
runIfValid() : mixed
setSqlAdapter()
Set the SQL Adapter
public
setSqlAdapter(AbstractSqlAdapter $sqlAdapter) : static
Parameters
- $sqlAdapter : AbstractSqlAdapter
Return values
staticsetTransactionOperationSet()
Set the TransactionOperationSet
public
setTransactionOperationSet(TransactionOperationSet $transactionOperationSet) : static
Parameters
- $transactionOperationSet : TransactionOperationSet
Return values
staticvalidate()
Validate this operation
public
validate([int &$errors = 0 ]) : void
Parameters
- $errors : int = 0
Tags
setIsValid()
Set this operation validity
protected
setIsValid(bool $valid) : static
Parameters
- $valid : bool