MediaWiki master
MediaWiki\Installer\SqliteInstaller Class Reference

Class for setting up the MediaWiki database using SQLLite. More...

Inherits MediaWiki\Installer\DatabaseInstaller.

Collaboration diagram for MediaWiki\Installer\SqliteInstaller:

Public Member Functions

 checkPrerequisites ()
 
 getConnectForm (WebInstaller $webInstaller)
 
 getGlobalDefaults ()
 Get a name=>value map of MW configuration globals for the default values.
 
 getLocalSettings ()
 
 getName ()
 Return the internal name, e.g.
 
 getSettingsForm (WebInstaller $webInstaller)
 
 isCompiled ()
 
 openConnection (string $type)
 
- Public Member Functions inherited from MediaWiki\Installer\DatabaseInstaller
 __construct ( $parent)
 Construct and initialise parent.
 
 definitelyGetConnection (string $type)
 Get a connection and unwrap it from its Status object, throwing an exception on failure.
 
 getConfigVar (string $name)
 Get a MediaWiki configuration value for the wiki being created.
 
 getConnection ( $type=self::CONN_DONT_KNOW)
 Connect to the database using the administrative user/password currently defined in the session.
 
 getDbType ()
 Get the selected database type name.
 
 getGlobalNames ()
 Get an array of MW configuration globals that will be configured by this class.
 
 getInternalDefaults ()
 Get a name=>value map of internal variables used during installation.
 
 getOption (string $name)
 Get a named installer option.
 
 getProvision (string $name)
 Get the object stored by provide()
 
 getReadableName ()
 Get the internationalised name for this DBMS.
 
 getSchemaVars ()
 Override this to provide DBMS-specific schema variables, to be substituted into the schema files.
 
 getVar ( $var, $default=null)
 Get a variable, taking local defaults into account.
 
 needsUpgrade ()
 Determine whether an existing installation of MediaWiki is present in the configured administrative connection.
 
 preUpgrade ()
 Allow DB installers a chance to make checks before upgrade.
 
 provide (string $name, $value)
 Store an object to be used by a later task.
 
 setVar ( $name, $value)
 Convenience alias for $this->parent->setVar()
 

Public Attributes

DatabaseSqlite $db
 
- Public Attributes inherited from MediaWiki\Installer\DatabaseInstaller
IMaintainableDatabase $db = null
 
Installer $parent
 The Installer object.
 
- Public Attributes inherited from MediaWiki\Installer\Task\ITaskContext
const CONN_CREATE_DATABASE = 'create-database'
 A connection for creating DBs, suitable for pre-installation.
 
const CONN_CREATE_SCHEMA = 'create-schema'
 A connection to the new DB, for creating schemas and other similar objects in the new DB.
 
const CONN_CREATE_TABLES = 'create-tables'
 A connection with a role suitable for creating tables.
 
const CONN_DONT_KNOW = 'dont-know'
 Legacy default connection type.
 

Static Public Attributes

static $minimumVersion = '3.8.0'
 
- Static Public Attributes inherited from MediaWiki\Installer\DatabaseInstaller
static string $minimumVersion
 Set by subclasses.
 

Protected Attributes

 $globalNames
 
- Protected Attributes inherited from MediaWiki\Installer\DatabaseInstaller
array $globalNames = []
 Array of MW configuration globals this class uses.
 
array $internalDefaults = []
 Internal variables for installation.
 

Static Protected Attributes

static $notMinimumVersionMessage = 'config-outdated-sqlite'
 
- Static Protected Attributes inherited from MediaWiki\Installer\DatabaseInstaller
static string $notMinimumVersionMessage
 Set by subclasses.
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Installer\DatabaseInstaller
static meetsMinimumRequirement (IDatabase $conn)
 Whether the provided version meets the necessary requirements for this type.
 
- Protected Member Functions inherited from MediaWiki\Installer\DatabaseInstaller
 changeConnType (IMaintainableDatabase $conn, &$storedType, $newType)
 Change the type of a connection.
 
 changeConnTypeFromSchemaToTables (IMaintainableDatabase $conn)
 Change the type of a connection from CONN_CREATE_SCHEMA to CONN_CREATE_TABLES.
 
- Static Protected Member Functions inherited from MediaWiki\Installer\DatabaseInstaller
static checkExtension ( $name)
 Convenience function.
 

Detailed Description

Class for setting up the MediaWiki database using SQLLite.

Since
1.17

Definition at line 38 of file SqliteInstaller.php.

Member Function Documentation

◆ checkPrerequisites()

MediaWiki\Installer\SqliteInstaller::checkPrerequisites ( )
Returns
Status

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 75 of file SqliteInstaller.php.

◆ getConnectForm()

MediaWiki\Installer\SqliteInstaller::getConnectForm ( WebInstaller $webInstaller)

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 64 of file SqliteInstaller.php.

◆ getGlobalDefaults()

MediaWiki\Installer\SqliteInstaller::getGlobalDefaults ( )

Get a name=>value map of MW configuration globals for the default values.

Returns
array

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 87 of file SqliteInstaller.php.

References $IP, and $path.

◆ getLocalSettings()

MediaWiki\Installer\SqliteInstaller::getLocalSettings ( )
Returns
string

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 136 of file SqliteInstaller.php.

◆ getName()

MediaWiki\Installer\SqliteInstaller::getName ( )

Return the internal name, e.g.

'mysql', or 'sqlite'.

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 56 of file SqliteInstaller.php.

◆ getSettingsForm()

MediaWiki\Installer\SqliteInstaller::getSettingsForm ( WebInstaller $webInstaller)

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 68 of file SqliteInstaller.php.

◆ isCompiled()

MediaWiki\Installer\SqliteInstaller::isCompiled ( )
Returns
bool Returns true if the client library is compiled in.

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 60 of file SqliteInstaller.php.

References MediaWiki\Installer\DatabaseInstaller\checkExtension().

◆ openConnection()

MediaWiki\Installer\SqliteInstaller::openConnection ( string $type)
Parameters
string$type
Returns
ConnectionStatus

Reimplemented from MediaWiki\Installer\DatabaseInstaller.

Definition at line 108 of file SqliteInstaller.php.

Member Data Documentation

◆ $db

DatabaseSqlite MediaWiki\Installer\SqliteInstaller::$db

Definition at line 48 of file SqliteInstaller.php.

◆ $globalNames

MediaWiki\Installer\SqliteInstaller::$globalNames
protected
Initial value:
= [
'wgDBname',
'wgSQLiteDataDir',
]

Definition at line 51 of file SqliteInstaller.php.

◆ $minimumVersion

MediaWiki\Installer\SqliteInstaller::$minimumVersion = '3.8.0'
static

Definition at line 41 of file SqliteInstaller.php.

◆ $notMinimumVersionMessage

MediaWiki\Installer\SqliteInstaller::$notMinimumVersionMessage = 'config-outdated-sqlite'
staticprotected

Definition at line 43 of file SqliteInstaller.php.


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