MediaWiki master
MediaWiki\Installer\DatabaseCreator Class Reference

Helper for creating databases. More...

Inherited by MediaWiki\Installer\NetworkedDatabaseCreator, and MediaWiki\Installer\SqliteDatabaseCreator.

Collaboration diagram for MediaWiki\Installer\DatabaseCreator:

Public Member Functions

 createInLoadBalancer (ILoadBalancer $loadBalancer, $database)
 Create a database in the specified LoadBalancer which may be for an external cluster.
 
 createLocally ( $database)
 Create a database in the local cluster or install context.
 
 existsInLoadBalancer (ILoadBalancer $loadBalancer, $database)
 Check if a database exists in the specified LoadBalancer which may be for an external cluster.
 
 existsLocally ( $database)
 Check if a database exists on the local cluster or context.
 

Static Public Member Functions

static createInstance (ITaskContext $context)
 

Protected Member Functions

 __construct (ITaskContext $context)
 

Protected Attributes

ITaskContext $context
 

Detailed Description

Helper for creating databases.

Since
1.44

Definition at line 15 of file DatabaseCreator.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\DatabaseCreator::__construct ( ITaskContext $context)
protected
Parameters
ITaskContext$context

Reimplemented in MediaWiki\Installer\SqliteDatabaseCreator.

Definition at line 43 of file DatabaseCreator.php.

Member Function Documentation

◆ createInLoadBalancer()

MediaWiki\Installer\DatabaseCreator::createInLoadBalancer ( ILoadBalancer $loadBalancer,
$database )
abstract

Create a database in the specified LoadBalancer which may be for an external cluster.

Parameters
ILoadBalancer$loadBalancer
string$database
Returns
Status

Reimplemented in MediaWiki\Installer\NetworkedDatabaseCreator, and MediaWiki\Installer\SqliteDatabaseCreator.

◆ createInstance()

static MediaWiki\Installer\DatabaseCreator::createInstance ( ITaskContext $context)
static
Access: internal
use Task::getDatabaseCreator()
Parameters
ITaskContext$context
Returns
DatabaseCreator

Definition at line 25 of file DatabaseCreator.php.

References MediaWiki\Installer\DatabaseCreator\$context.

◆ createLocally()

MediaWiki\Installer\DatabaseCreator::createLocally ( $database)
abstract

Create a database in the local cluster or install context.

Parameters
string$database
Returns
Status

Reimplemented in MediaWiki\Installer\NetworkedDatabaseCreator, and MediaWiki\Installer\SqliteDatabaseCreator.

◆ existsInLoadBalancer()

MediaWiki\Installer\DatabaseCreator::existsInLoadBalancer ( ILoadBalancer $loadBalancer,
$database )
abstract

Check if a database exists in the specified LoadBalancer which may be for an external cluster.

Parameters
ILoadBalancer$loadBalancer
string$database
Returns
bool

Reimplemented in MediaWiki\Installer\NetworkedDatabaseCreator, and MediaWiki\Installer\SqliteDatabaseCreator.

◆ existsLocally()

MediaWiki\Installer\DatabaseCreator::existsLocally ( $database)
abstract

Check if a database exists on the local cluster or context.

Parameters
string$database
Returns
bool

Reimplemented in MediaWiki\Installer\NetworkedDatabaseCreator, and MediaWiki\Installer\SqliteDatabaseCreator.

Member Data Documentation

◆ $context

ITaskContext MediaWiki\Installer\DatabaseCreator::$context
protected

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