MediaWiki  1.28.0
DatabaseDomain Class Reference

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

Collaboration diagram for 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 25 of file DatabaseDomain.php.

Constructor & Destructor Documentation

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

Definition at line 41 of file DatabaseDomain.php.

References $database, $prefix, $schema, and database.

Member Function Documentation

DatabaseDomain::__toString ( )
Returns
string

Definition at line 203 of file DatabaseDomain.php.

References getId().

DatabaseDomain::convertToString ( )
private
Returns
string

Definition at line 145 of file DatabaseDomain.php.

References $database, $prefix, and $schema.

Referenced by getId().

static DatabaseDomain::decode (   $encoded)
staticprivate

Definition at line 175 of file DatabaseDomain.php.

static DatabaseDomain::encode (   $decoded)
staticprivate

Definition at line 157 of file DatabaseDomain.php.

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

Definition at line 98 of file DatabaseDomain.php.

References database, and getId().

DatabaseDomain::getDatabase ( )
Returns
string|null Database name

Definition at line 113 of file DatabaseDomain.php.

References $database.

DatabaseDomain::getId ( )
Returns
string

Definition at line 134 of file DatabaseDomain.php.

References $equivalentString, and convertToString().

Referenced by __toString(), equals(), and DBConnRef\getDomainID().

DatabaseDomain::getSchema ( )
Returns
string|null Database schema

Definition at line 120 of file DatabaseDomain.php.

References $schema.

DatabaseDomain::getTablePrefix ( )
Returns
string Table prefix

Definition at line 127 of file DatabaseDomain.php.

References $prefix.

static DatabaseDomain::newFromId (   $domain)
static
Parameters
DatabaseDomain | string$domainResult of DatabaseDomain::toString()
Returns
DatabaseDomain

Definition at line 60 of file DatabaseDomain.php.

References $database, $prefix, $schema, and list.

Referenced by LBFactory\__construct(), LoadBalancer\__construct(), LBFactoryMulti\getDBNameAndPrefix(), LoadBalancer\openForeignConnection(), and DatabaseDomainTest\testNewFromId().

Member Data Documentation

string null DatabaseDomain::$database
private

Definition at line 27 of file DatabaseDomain.php.

Referenced by __construct(), convertToString(), getDatabase(), and newFromId().

string DatabaseDomain::$equivalentString
private

Cache of convertToString()

Definition at line 34 of file DatabaseDomain.php.

Referenced by getId().

string DatabaseDomain::$prefix
private

Definition at line 31 of file DatabaseDomain.php.

Referenced by __construct(), convertToString(), getTablePrefix(), and newFromId().

string null DatabaseDomain::$schema
private

Definition at line 29 of file DatabaseDomain.php.

Referenced by __construct(), convertToString(), getSchema(), and newFromId().


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