MediaWiki REL1_40
Wikimedia\Rdbms\Database\DatabaseFlags Class Reference

Inherits Wikimedia\Rdbms\Database\IDatabaseFlags.

Collaboration diagram for Wikimedia\Rdbms\Database\DatabaseFlags:

Public Member Functions

 __construct ( $flags)
 
 clearFlag ( $flag, $remember=self::REMEMBER_NOTHING)
 Clear a flag for this connection.
 
 getFlag ( $flag)
 Returns a boolean whether the flag $flag is set for this connection.
 
 hasImplicitTrxFlag ()
 
 restoreFlags ( $state=self::RESTORE_PRIOR)
 Restore the flags to their prior state before the last setFlag/clearFlag call.
 
 setFlag ( $flag, $remember=self::REMEMBER_NOTHING)
 Set a flag for this connection.
 

Static Public Member Functions

static contains (int $flags, int $bit)
 

Protected Attributes

int $flags
 Current bit field of class DBO_* constants.
 

Detailed Description

Access: internal
Since
1.39

Definition at line 29 of file DatabaseFlags.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Rdbms\Database\DatabaseFlags::__construct ( $flags)

Definition at line 47 of file DatabaseFlags.php.

References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.

Member Function Documentation

◆ clearFlag()

Wikimedia\Rdbms\Database\DatabaseFlags::clearFlag ( $flag,
$remember = self::REMEMBER_NOTHING )

Clear a flag for this connection.

Parameters
int$flagOne of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX)
string$rememberIDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]

Implements Wikimedia\Rdbms\Database\IDatabaseFlags.

Definition at line 65 of file DatabaseFlags.php.

References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.

◆ contains()

static Wikimedia\Rdbms\Database\DatabaseFlags::contains ( int $flags,
int $bit )
static
Parameters
int$flagsA bitfield of flags
int$bitBit flag constant
Returns
bool Whether the bit field has the specified bit flag set
Since
1.34

Definition at line 102 of file DatabaseFlags.php.

References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.

◆ getFlag()

Wikimedia\Rdbms\Database\DatabaseFlags::getFlag ( $flag)

Returns a boolean whether the flag $flag is set for this connection.

Parameters
int$flagOne of the class IDatabase::DBO_* constants
Returns
bool

Implements Wikimedia\Rdbms\Database\IDatabaseFlags.

Definition at line 92 of file DatabaseFlags.php.

Referenced by Wikimedia\Rdbms\Database\DatabaseFlags\hasImplicitTrxFlag().

◆ hasImplicitTrxFlag()

Wikimedia\Rdbms\Database\DatabaseFlags::hasImplicitTrxFlag ( )

◆ restoreFlags()

Wikimedia\Rdbms\Database\DatabaseFlags::restoreFlags ( $state = self::RESTORE_PRIOR)

Restore the flags to their prior state before the last setFlag/clearFlag call.

Parameters
string$stateIDatabase::RESTORE_* constant. [default: RESTORE_PRIOR]
Since
1.28

Implements Wikimedia\Rdbms\Database\IDatabaseFlags.

Definition at line 79 of file DatabaseFlags.php.

◆ setFlag()

Wikimedia\Rdbms\Database\DatabaseFlags::setFlag ( $flag,
$remember = self::REMEMBER_NOTHING )

Set a flag for this connection.

Parameters
int$flagOne of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX)
string$rememberIDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]

Implements Wikimedia\Rdbms\Database\IDatabaseFlags.

Definition at line 51 of file DatabaseFlags.php.

References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.

Member Data Documentation

◆ $flags

int Wikimedia\Rdbms\Database\DatabaseFlags::$flags
protected

The documentation for this class was generated from the following file: