MediaWiki
REL1_40
TransactionIdentifier.php
Go to the documentation of this file.
1
<?php
20
namespace
Wikimedia\Rdbms
;
21
28
class
TransactionIdentifier
{
30
private
$id =
''
;
31
32
public
function
__construct
() {
33
static
$nextId;
34
$nextId = ( $nextId !==
null
? $nextId++ : mt_rand() ) % 0xffff;
35
$this->
id
= sprintf(
'%06x'
, mt_rand( 0, 0xffffff ) ) . sprintf(
'%04x'
, $nextId );
36
}
37
38
public
function
__toString
() {
39
return
$this->id;
40
}
41
}
Wikimedia\Rdbms\TransactionIdentifier
Class used for token representing identifiers for atomic transactions from IDatabase instances.
Definition
TransactionIdentifier.php:28
Wikimedia\Rdbms\TransactionIdentifier\__construct
__construct()
Definition
TransactionIdentifier.php:32
Wikimedia\Rdbms\TransactionIdentifier\__toString
__toString()
Definition
TransactionIdentifier.php:38
Wikimedia\Rdbms
Definition
ChronologyProtector.php:20
includes
libs
rdbms
database
utils
TransactionIdentifier.php
Generated on Thu Jun 27 2024 14:03:15 for MediaWiki by
1.10.0