PHP Class Storm\Core\Relational\Transaction

Author: Elliot Levin ([email protected])
Exibir arquivo Open project: timetoogo/penumbra Class Usage Examples

Public Methods

Method Description
Discard ( PrimaryKey $PrimaryKey ) : void Discard a row from its primary key within the transaction.
DiscardAll ( array $PrimaryKeys ) : void Discard an array of rows from their primary keys within the transaction.
DiscardWhere ( Criterion $Criterion ) : void Discard rows if they match the supplied criterion.
Execute ( Procedure $Procedure ) : void Add a procedure to be executed within the transaction.
GetDiscardedCriteria ( ) : Criterion[]
GetDiscardedPrimaryKeyGroups ( ) : PrimaryKey[][]
GetDiscardedPrimaryKeys ( ) : PrimaryKey[]
GetPersistedRowGroups ( ) : Row[][]
GetPersistedRows ( ) : Row[]
GetProcedures ( ) : Procedure[]
Persist ( Row $Row ) : void Persist a row within the transaction.
PersistAll ( array $Rows ) : void Persist an array of rows within the transaction.
SubscribeToPostPersistEvent ( Storm\Core\Relational\ITable $Table, callable $Event ) : void Subscribe a callback to after the supplied row was persisted.
SubscribeToPrePersistEvent ( Storm\Core\Relational\ITable $Table, callable $Event ) Subscribe a callback to when the supplied row will be persisted.
TriggerPostPersistEvent ( Storm\Core\Relational\ITable $Table ) : void Trigger the post persist callbacks for the supplied rows
TriggerPrePersistEvent ( Storm\Core\Relational\ITable $Table ) : void Trigger the pre persist callbacks for the supplied rows
__construct ( )

Private Methods

Method Description
AddEvent ( Map $EventMap, objecy $Key, callable $Event ) : void Add an event to an event map
TriggerEvents ( Map $EventMap, object $Key, array $CustomArguments = [] ) : void Trigger all events in an event map with a specific key.

Method Details

Discard() public method

Discard a row from its primary key within the transaction.
public Discard ( PrimaryKey $PrimaryKey ) : void
$PrimaryKey PrimaryKey The primary key to discard
return void

DiscardAll() public method

Discard an array of rows from their primary keys within the transaction.
public DiscardAll ( array $PrimaryKeys ) : void
$PrimaryKeys array The primary keys to discard
return void

DiscardWhere() public method

Discard rows if they match the supplied criterion.
public DiscardWhere ( Criterion $Criterion ) : void
$Criterion Criterion The criterion to match
return void

Execute() public method

Add a procedure to be executed within the transaction.
public Execute ( Procedure $Procedure ) : void
$Procedure Procedure The procedure to execute
return void

GetDiscardedCriteria() public method

public GetDiscardedCriteria ( ) : Criterion[]
return Criterion[]

GetDiscardedPrimaryKeyGroups() public method

public GetDiscardedPrimaryKeyGroups ( ) : PrimaryKey[][]
return PrimaryKey[][]

GetDiscardedPrimaryKeys() public method

public GetDiscardedPrimaryKeys ( ) : PrimaryKey[]
return PrimaryKey[]

GetPersistedRowGroups() public method

public GetPersistedRowGroups ( ) : Row[][]
return Row[][]

GetPersistedRows() public method

public GetPersistedRows ( ) : Row[]
return Row[]

GetProcedures() public method

public GetProcedures ( ) : Procedure[]
return Procedure[]

Persist() public method

Persist a row within the transaction.
public Persist ( Row $Row ) : void
$Row Row The row to persist
return void

PersistAll() public method

Persist an array of rows within the transaction.
public PersistAll ( array $Rows ) : void
$Rows array The rows to persist
return void

SubscribeToPostPersistEvent() public method

Subscribe a callback to after the supplied row was persisted.
public SubscribeToPostPersistEvent ( Storm\Core\Relational\ITable $Table, callable $Event ) : void
$Table Storm\Core\Relational\ITable
$Event callable
return void

SubscribeToPrePersistEvent() public method

Subscribe a callback to when the supplied row will be persisted.
public SubscribeToPrePersistEvent ( Storm\Core\Relational\ITable $Table, callable $Event )
$Table Storm\Core\Relational\ITable
$Event callable

TriggerPostPersistEvent() public method

Trigger the post persist callbacks for the supplied rows
public TriggerPostPersistEvent ( Storm\Core\Relational\ITable $Table ) : void
$Table Storm\Core\Relational\ITable The table to trigger
return void

TriggerPrePersistEvent() public method

Trigger the pre persist callbacks for the supplied rows
public TriggerPrePersistEvent ( Storm\Core\Relational\ITable $Table ) : void
$Table Storm\Core\Relational\ITable The table to trigger
return void

__construct() public method

public __construct ( )