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
checkHasNextItem()  : 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()  : array<string|int, DoorkeeperException>|null
updateCollections()  : void
fetchPreTransactionParentIds()  : 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 ][, bool $throwException = true ]) : array<string|int, DoorkeeperException>|null
Parameters
$attribute : string = CheckAttribute::class
$filter : int = ReflectionMethod::IS_PUBLIC
$throwException : bool = true

if true, the method throws a DoorkeeperException on errors or null otherwise. If false, method returns a (possibly empty) array of DoorkeeperExceptions.

Return values
array<string|int, DoorkeeperException>|null

fetchPreTransactionParentIds()

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

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

updateCollectionAggregates()

private updateCollectionAggregates() : void

updateCollectionSize()

private updateCollectionSize() : void

        
On this page

Search results