MediaWiki  1.29.1
Wikimedia\Rdbms\DatabaseDomain Class Reference

Class to handle database/prefix specification for IDatabase domains. More...

Collaboration diagram for Wikimedia\Rdbms\DatabaseDomain:

Public Member Functions

 __construct ( $database, $schema, $prefix)
 
 __toString ()
 
 equals ( $other)
 
 getDatabase ()
 
 getId ()
 
 getSchema ()
 
 getTablePrefix ()
 

Static Public Member Functions

static newFromId ( $domain)
 
static newUnspecified ()
 

Private Member Functions

 convertToString ()
 

Static Private Member Functions

static decode ( $encoded)
 
static encode ( $decoded)
 

Private Attributes

string null $database
 
string $equivalentString
 Cache of convertToString() More...
 
string $prefix
 
string null $schema
 

Detailed Description

Class to handle database/prefix specification for IDatabase domains.

Definition at line 28 of file DatabaseDomain.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\Rdbms\DatabaseDomain::__construct (   $database,
  $schema,
  $prefix 
)
Parameters
string | null$databaseDatabase name
string | null$schemaSchema name
string$prefixTable prefix

Definition at line 44 of file DatabaseDomain.php.

References Wikimedia\Rdbms\DatabaseDomain\$database, Wikimedia\Rdbms\DatabaseDomain\$prefix, Wikimedia\Rdbms\DatabaseDomain\$schema, and database.

Member Function Documentation

◆ __toString()

Wikimedia\Rdbms\DatabaseDomain::__toString ( )
Returns
string

Definition at line 206 of file DatabaseDomain.php.

References Wikimedia\Rdbms\DatabaseDomain\getId().

◆ convertToString()

Wikimedia\Rdbms\DatabaseDomain::convertToString ( )
private

◆ decode()

static Wikimedia\Rdbms\DatabaseDomain::decode (   $encoded)
staticprivate

Definition at line 178 of file DatabaseDomain.php.

◆ encode()

static Wikimedia\Rdbms\DatabaseDomain::encode (   $decoded)
staticprivate

Definition at line 160 of file DatabaseDomain.php.

◆ equals()

Wikimedia\Rdbms\DatabaseDomain::equals (   $other)
Parameters
DatabaseDomain | string$other
Returns
bool

Definition at line 101 of file DatabaseDomain.php.

References database, and Wikimedia\Rdbms\DatabaseDomain\getId().

◆ getDatabase()

Wikimedia\Rdbms\DatabaseDomain::getDatabase ( )
Returns
string|null Database name

Definition at line 116 of file DatabaseDomain.php.

References Wikimedia\Rdbms\DatabaseDomain\$database.

◆ getId()

◆ getSchema()

Wikimedia\Rdbms\DatabaseDomain::getSchema ( )
Returns
string|null Database schema

Definition at line 123 of file DatabaseDomain.php.

References Wikimedia\Rdbms\DatabaseDomain\$schema.

◆ getTablePrefix()

Wikimedia\Rdbms\DatabaseDomain::getTablePrefix ( )
Returns
string Table prefix

Definition at line 130 of file DatabaseDomain.php.

References Wikimedia\Rdbms\DatabaseDomain\$prefix.

◆ newFromId()

◆ newUnspecified()

static Wikimedia\Rdbms\DatabaseDomain::newUnspecified ( )
static

Member Data Documentation

◆ $database

◆ $equivalentString

string Wikimedia\Rdbms\DatabaseDomain::$equivalentString
private

Cache of convertToString()

Definition at line 37 of file DatabaseDomain.php.

Referenced by Wikimedia\Rdbms\DatabaseDomain\getId().

◆ $prefix

◆ $schema


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