TTransaction
in package
Manage Database transactions
Tags
Table of Contents
Properties
Methods
- close() : mixed
- Commit all the pending operations
- closeAll() : mixed
- close all transactions
- dump() : mixed
- Enable transaction log
- get() : PDO
- Returns the current active connection
- getDatabase() : mixed
- Return the Database Name
- getDatabaseInfo() : mixed
- Returns the Database Information
- getUniqId() : mixed
- Returns the Transaction uniqid
- log() : mixed
- Write a message in the LOG file, using the user strategy
- open() : mixed
- Open a connection and Initiates a transaction
- openFake() : mixed
- Open fake transaction
- rollback() : mixed
- Rollback all pending operations
- rollbackAll() : mixed
- rollback all transactions
- setLogger() : mixed
- Assign a Logger strategy
- setLoggerFunction() : mixed
- Assign a Logger closure function
- __construct() : mixed
- Class Constructor There won't be instances of this class
Properties
$conn
private
static mixed
$conn
$counter
private
static mixed
$counter
$database
private
static mixed
$database
$dbinfo
private
static mixed
$dbinfo
$logger
private
static mixed
$logger
$uniqid
private
static mixed
$uniqid
Methods
close()
Commit all the pending operations
public
static close() : mixed
closeAll()
close all transactions
public
static closeAll() : mixed
dump()
Enable transaction log
public
static dump([mixed $file = null ]) : mixed
Parameters
- $file : mixed = null
get()
Returns the current active connection
public
static get() : PDO
Return values
PDOgetDatabase()
Return the Database Name
public
static getDatabase() : mixed
getDatabaseInfo()
Returns the Database Information
public
static getDatabaseInfo() : mixed
getUniqId()
Returns the Transaction uniqid
public
static getUniqId() : mixed
log()
Write a message in the LOG file, using the user strategy
public
static log( $message) : mixed
Parameters
open()
Open a connection and Initiates a transaction
public
static open( $database[, $dbinfo = NULL ]) : mixed
Parameters
openFake()
Open fake transaction
public
static openFake( $database) : mixed
Parameters
rollback()
Rollback all pending operations
public
static rollback() : mixed
rollbackAll()
rollback all transactions
public
static rollbackAll() : mixed
setLogger()
Assign a Logger strategy
public
static setLogger([ $logger = null ]) : mixed
Parameters
setLoggerFunction()
Assign a Logger closure function
public
static setLoggerFunction( $logger) : mixed
Parameters
__construct()
Class Constructor There won't be instances of this class
private
__construct() : mixed