com\setasign\SetaFramework\Registry
PersistantDatabase Class PersistantDatabase
File: /SetaFramework/src/Registry/PersistantDatabase.php
Class hierarchy
Implements
- \Psr\Log\LoggerAwareInterface
Summary
Constants
FLAG_NOWAIT
LOCK_READ
LOCK_WRITE
Properties
$lock
protected ?int PersistantDatabase::$lock
$logger
protected ?\Psr\Log\LoggerInterface PersistantDatabase::$logger
$registryName
protected string PersistantDatabase::$registryName
$transactionId
protected ?string PersistantDatabase::$transactionId
The id of the transaction in which the lock was created. Only needed if no own transaction is used.
Static Methods
setupTable()
public static PersistantDatabase::setupTable (
\com\setasign\SetaFramework\Database\Manager\TableSchemaBuilder $tableSchemaBuilder,
string $tableName = 'persistant_registry'
): voidstring $tableName = 'persistant_registry'
Parameters
- $tableSchemaBuilder : \com\setasign\SetaFramework\Database\Manager\TableSchemaBuilder
- $tableName : string
Exceptions
Throws \com\setasign\SetaFramework\Database\Manager\TableSchemaBuilderException
Methods
__construct()
public PersistantDatabase::__construct ()
Parameters
- $registryName : string
- $table : \com\setasign\SetaFramework\Database\TableInterface
Exceptions
read()
readProcess()
Exceptions
Throws \com\setasign\SetaFramework\Exception If the registry data cannot be read.
startRead()
write()
Parameters
- $callback : callable
- $options : int
Exceptions
Throws \Throwable Any exceptions which is thrown in the callback.
writeProcess()
Parameters
- $registry : Registry
Exceptions
Throws \com\setasign\SetaFramework\Exception If the registry data cannot be saved.
writeWithExternalTransaction()
public PersistantDatabase::writeWithExternalTransaction (
callable $callback,
int $options = 0
): voidint $options = 0
Parameters
- $callback : callable
- $options : int
