MediaWiki REL1_33
|
Class to handle database/prefix specification for IDatabase domains. More...
Public Member Functions | |
__construct ( $database, $schema, $prefix) | |
__toString () | |
equals ( $other) | |
getDatabase () | |
getId () | |
getSchema () | |
getTablePrefix () | |
isCompatible ( $other) | |
Check whether the domain $other meets the specifications of this domain. | |
isUnspecified () | |
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() | |
string | $prefix |
string null | $schema |
Class to handle database/prefix specification for IDatabase domains.
Definition at line 28 of file DatabaseDomain.php.
Wikimedia\Rdbms\DatabaseDomain::__construct | ( | $database, | |
$schema, | |||
$prefix ) |
string | null | $database | Database name |
string | null | $schema | Schema name |
string | $prefix | Table prefix |
Definition at line 44 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$database, Wikimedia\Rdbms\DatabaseDomain\$prefix, Wikimedia\Rdbms\DatabaseDomain\$schema, and and().
Wikimedia\Rdbms\DatabaseDomain::__toString | ( | ) |
Definition at line 255 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\getId().
|
private |
Definition at line 192 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$prefix, Wikimedia\Rdbms\DatabaseDomain\$schema, and(), and string.
Referenced by Wikimedia\Rdbms\DatabaseDomain\getId().
|
staticprivate |
Definition at line 227 of file DatabaseDomain.php.
References and().
|
staticprivate |
Definition at line 209 of file DatabaseDomain.php.
References and().
Wikimedia\Rdbms\DatabaseDomain::equals | ( | $other | ) |
DatabaseDomain | string | $other |
Definition at line 107 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\getId().
Wikimedia\Rdbms\DatabaseDomain::getDatabase | ( | ) |
Definition at line 160 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$database.
Referenced by DatabaseOracle\doSelectDomain(), Wikimedia\Rdbms\DatabaseMssql\doSelectDomain(), Wikimedia\Rdbms\DatabaseMysqlBase\doSelectDomain(), Wikimedia\Rdbms\DatabasePostgres\doSelectDomain(), Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection(), and Wikimedia\Rdbms\LoadBalancer\setLocalDomain().
Wikimedia\Rdbms\DatabaseDomain::getId | ( | ) |
Definition at line 181 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$equivalentString, and Wikimedia\Rdbms\DatabaseDomain\convertToString().
Referenced by Wikimedia\Rdbms\DatabaseDomain\__toString(), Wikimedia\Rdbms\DatabaseDomain\equals(), and Wikimedia\Rdbms\DBConnRef\getDomainID().
Wikimedia\Rdbms\DatabaseDomain::getSchema | ( | ) |
Definition at line 167 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$schema.
Referenced by DatabaseOracle\doSelectDomain(), Wikimedia\Rdbms\DatabaseMssql\doSelectDomain(), Wikimedia\Rdbms\DatabaseMysqlBase\doSelectDomain(), Wikimedia\Rdbms\DatabasePostgres\doSelectDomain(), and Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection().
Wikimedia\Rdbms\DatabaseDomain::getTablePrefix | ( | ) |
Definition at line 174 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$prefix.
Referenced by Wikimedia\Rdbms\DatabaseMysqlBase\doSelectDomain(), Wikimedia\Rdbms\DatabasePostgres\doSelectDomain(), and Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection().
Wikimedia\Rdbms\DatabaseDomain::isCompatible | ( | $other | ) |
Check whether the domain $other meets the specifications of this domain.
If this instance has a null database specifier, then $other can have any database specifier, including null. This is likewise true if the schema specifier is null. This is not transitive like equals() since a domain that explicitly wants a certain database or schema cannot be satisfied by one of another (nor null). If the prefix is empty and the DB and schema are both null, then the entire domain is considered unspecified, and any prefix of $other is considered compatible.
DatabaseDomain | string | $other |
Definition at line 133 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\isUnspecified(), and Wikimedia\Rdbms\DatabaseDomain\newFromId().
Wikimedia\Rdbms\DatabaseDomain::isUnspecified | ( | ) |
Definition at line 151 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseDomain\isCompatible().
|
static |
DatabaseDomain | string | $domain | Result of DatabaseDomain::toString() |
Definition at line 65 of file DatabaseDomain.php.
References Wikimedia\Rdbms\DatabaseDomain\$database, Wikimedia\Rdbms\DatabaseDomain\$prefix, Wikimedia\Rdbms\DatabaseDomain\$schema, and(), and list.
Referenced by Wikimedia\Rdbms\LBFactory\__construct(), Wikimedia\Rdbms\LoadBalancer\__construct(), Wikimedia\Rdbms\DBConnRef\dbSchema(), Wikimedia\Rdbms\DBConnRef\getDBname(), Wikimedia\Rdbms\LBFactoryMulti\getDBNameAndPrefix(), Wikimedia\Rdbms\DatabaseDomain\isCompatible(), Wikimedia\Rdbms\LoadBalancer\openForeignConnection(), Wikimedia\Rdbms\LBFactory\redefineLocalDomain(), Wikimedia\Rdbms\LoadBalancer\redefineLocalDomain(), Wikimedia\Rdbms\Database\selectDomain(), and Wikimedia\Rdbms\DBConnRef\tablePrefix().
|
static |
Definition at line 99 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\LBFactory\__construct(), and Wikimedia\Rdbms\LoadBalancer\__construct().
|
private |
Definition at line 30 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseDomain\__construct(), Wikimedia\Rdbms\DatabaseDomain\getDatabase(), and Wikimedia\Rdbms\DatabaseDomain\newFromId().
|
private |
Cache of convertToString()
Definition at line 37 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseDomain\getId().
|
private |
Definition at line 34 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseDomain\__construct(), Wikimedia\Rdbms\DatabaseDomain\convertToString(), Wikimedia\Rdbms\DatabaseDomain\getTablePrefix(), and Wikimedia\Rdbms\DatabaseDomain\newFromId().
|
private |
Definition at line 32 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseDomain\__construct(), Wikimedia\Rdbms\DatabaseDomain\convertToString(), Wikimedia\Rdbms\DatabaseDomain\getSchema(), and Wikimedia\Rdbms\DatabaseDomain\newFromId().