MediaWiki master
MediaWiki\Installer\Task\AddWikiTaskContext Class Reference

A task context for use in installPreConfigured.php. More...

Inherits MediaWiki\Installer\Task\ITaskContext.

Collaboration diagram for MediaWiki\Installer\Task\AddWikiTaskContext:

Public Member Functions

 __construct (Config $config, LBFactory $lbFactory)
 
 getConfigVar (string $name)
 Get a MediaWiki configuration value for the wiki being created.
 
 getConnection ( $type=self::CONN_DONT_KNOW)
 Connect to the database for a specified purpose.
 
 getDbType ()
 Get the selected database type name.
 
 getOption (string $name)
 Get a named installer option.
 
 getProvision (string $name)
 Get the object stored by provide()
 
 getSchemaVars ()
 Get schema variable replacements to be applied to SQL files.
 
 provide (string $name, $value)
 Store an object to be used by a later task.
 
 setConfigVar (string $name, $value)
 Override a configuration variable.
 
 setOption (string $name, $value)
 Set an installer option.
 

Additional Inherited Members

- 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.
 

Detailed Description

A task context for use in installPreConfigured.php.

Access: internal

Definition at line 18 of file AddWikiTaskContext.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\Task\AddWikiTaskContext::__construct ( Config $config,
LBFactory $lbFactory )

Definition at line 34 of file AddWikiTaskContext.php.

Member Function Documentation

◆ getConfigVar()

MediaWiki\Installer\Task\AddWikiTaskContext::getConfigVar ( string $name)

Get a MediaWiki configuration value for the wiki being created.

The name should not have a "wg" prefix.

Parameters
string$name
Returns
mixed

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 39 of file AddWikiTaskContext.php.

◆ getConnection()

MediaWiki\Installer\Task\AddWikiTaskContext::getConnection ( $type = self::CONN_DONT_KNOW)

Connect to the database for a specified purpose.

Parameters
string$typeOne of the self::CONN_* constants. Using CONN_DONT_KNOW is deprecated and will cause an exception to be thrown in a future release.
Returns
ConnectionStatus

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 47 of file AddWikiTaskContext.php.

◆ getDbType()

MediaWiki\Installer\Task\AddWikiTaskContext::getDbType ( )

Get the selected database type name.

Returns
string

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 97 of file AddWikiTaskContext.php.

◆ getOption()

MediaWiki\Installer\Task\AddWikiTaskContext::getOption ( string $name)

Get a named installer option.

Parameters
string$name
Returns
mixed

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 43 of file AddWikiTaskContext.php.

◆ getProvision()

MediaWiki\Installer\Task\AddWikiTaskContext::getProvision ( string $name)

Get the object stored by provide()

Parameters
string$name
Returns
mixed

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 105 of file AddWikiTaskContext.php.

◆ getSchemaVars()

MediaWiki\Installer\Task\AddWikiTaskContext::getSchemaVars ( )

Get schema variable replacements to be applied to SQL files.

Returns
array

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 85 of file AddWikiTaskContext.php.

◆ provide()

MediaWiki\Installer\Task\AddWikiTaskContext::provide ( string $name,
$value )

Store an object to be used by a later task.

Parameters
string$name
mixed$value

Implements MediaWiki\Installer\Task\ITaskContext.

Definition at line 101 of file AddWikiTaskContext.php.

◆ setConfigVar()

MediaWiki\Installer\Task\AddWikiTaskContext::setConfigVar ( string $name,
$value )

Override a configuration variable.

Parameters
string$name
mixed$value

Definition at line 119 of file AddWikiTaskContext.php.

◆ setOption()

MediaWiki\Installer\Task\AddWikiTaskContext::setOption ( string $name,
$value )

Set an installer option.

Parameters
string$name
mixed$value

Definition at line 129 of file AddWikiTaskContext.php.


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