Documentation

Transaction
in package
Uses RunTestsTrait

Tags
author

zozlak

Table of Contents

Constants

DB_LOCK_TIMEOUT  = 1000

Properties

$log  : LoggerInterface|null
$ontology  : Ontology
$parentIds  : array<string|int, int>
Stores ids of all pre-transaction parents of resources affected by the current transaction
$pdo  : PDO
$schema  : Schema
$txId  : int

Methods

__construct()  : mixed
checkAutoCreatedResources()  : void
checkEmptyCollections()  : void
checkIsNewVersionOf()  : void
isNewVersionOf can't create cycles so creation of the 2nd (and higher order) isNewVersionOf links to a resource is forbidden.
onTxCommit()  : void
runTests()  : void
updateCollections()  : void
fetchParentIds()  : array<string|int, int>
Returns ids of all pre-transaction parents of resources affected by the current transaction
updateCollectionAggregates()  : void
updateCollectionSize()  : void

Constants

Properties

$parentIds

Stores ids of all pre-transaction parents of resources affected by the current transaction

private array<string|int, int> $parentIds

Methods

__construct()

public __construct(int $txId, PDO $pdo, Schema $schema, Ontology $ontology[, LoggerInterface|null $log = null ]) : mixed
Parameters
$txId : int
$pdo : PDO
$schema : Schema
$ontology : Ontology
$log : LoggerInterface|null = null

checkIsNewVersionOf()

isNewVersionOf can't create cycles so creation of the 2nd (and higher order) isNewVersionOf links to a resource is forbidden.

public checkIsNewVersionOf() : void

As the doorkeeper can't lock resources in an effective way checking it is possible only at the transaction commit.

Tags
throws
DoorkeeperException

onTxCommit()

public static onTxCommit(string $method, int $txId, array<string|int, int> $resourceIds) : void
Parameters
$method : string
$txId : int
$resourceIds : array<string|int, int>
Tags
throws
DoorkeeperException

runTests()

public runTests([string $attribute = CheckAttribute::class ][, int $filter = ReflectionMethod::IS_PUBLIC ]) : void
Parameters
$attribute : string = CheckAttribute::class
$filter : int = ReflectionMethod::IS_PUBLIC

fetchParentIds()

Returns ids of all pre-transaction parents of resources affected by the current transaction

private fetchParentIds() : array<string|int, int>
Return values
array<string|int, int>

updateCollectionAggregates()

private updateCollectionAggregates() : void

updateCollectionSize()

private updateCollectionSize() : void

        
On this page

Search results