MediaWiki master
MediaWiki\Installer\DatabaseForm Class Reference

Inherited by MediaWiki\Installer\DatabaseConnectForm, and MediaWiki\Installer\DatabaseSettingsForm.

Collaboration diagram for MediaWiki\Installer\DatabaseForm:

Public Member Functions

 __construct (WebInstaller $webInstaller, DatabaseInstaller $dbInstaller)
 

Protected Member Functions

 getCheckBox ( $var, $label, $attribs=[], $helpData="")
 Get a labelled checkbox to configure a local boolean variable.
 
 getName ()
 Return the internal name, e.g.
 
 getPasswordBox ( $var, $label, $attribs=[], $helpData="")
 Get a labelled password box to configure a local variable.
 
 getRadioSet ( $params)
 Get a set of labelled radio buttons.
 
 getTextBox ( $var, $label, $attribs=[], $helpData="")
 Get a labelled text box to configure a local variable.
 
 getVar ( $var, $default=null)
 Get a variable, taking local defaults into account.
 
 setVar ( $name, $value)
 Set a variable.
 
 setVarsFromRequest ( $varNames)
 Convenience function to set variables based on form data.
 

Protected Attributes

DatabaseInstaller $dbInstaller
 
WebInstaller $webInstaller
 

Detailed Description

Access: internal

Definition at line 8 of file DatabaseForm.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\DatabaseForm::__construct ( WebInstaller $webInstaller,
DatabaseInstaller $dbInstaller )

Member Function Documentation

◆ getCheckBox()

MediaWiki\Installer\DatabaseForm::getCheckBox ( $var,
$label,
$attribs = [],
$helpData = "" )
protected

Get a labelled checkbox to configure a local boolean variable.

Parameters
string$var
string$label
array$attribsOptional.
string$helpDataOptional.
Returns
string

Definition at line 108 of file DatabaseForm.php.

References MediaWiki\Installer\DatabaseForm\getName(), and MediaWiki\Installer\DatabaseForm\getVar().

Referenced by MediaWiki\Installer\MysqlConnectForm\getHtml(), MediaWiki\Installer\PostgresConnectForm\getHtml(), and MediaWiki\Installer\DatabaseSettingsForm\getWebUserBox().

◆ getName()

MediaWiki\Installer\DatabaseForm::getName ( )
protected

◆ getPasswordBox()

MediaWiki\Installer\DatabaseForm::getPasswordBox ( $var,
$label,
$attribs = [],
$helpData = "" )
protected

Get a labelled password box to configure a local variable.

Implements password hiding.

Parameters
string$var
string$label
array$attribs
string$helpDataHTML
Returns
string HTML

Definition at line 82 of file DatabaseForm.php.

References MediaWiki\Installer\DatabaseForm\getName(), and MediaWiki\Installer\DatabaseForm\getVar().

Referenced by MediaWiki\Installer\DatabaseConnectForm\getInstallUserBox(), and MediaWiki\Installer\DatabaseSettingsForm\getWebUserBox().

◆ getRadioSet()

MediaWiki\Installer\DatabaseForm::getRadioSet ( $params)
protected

Get a set of labelled radio buttons.

Parameters
array$paramsParameters are: var: The variable to be configured (required) label: The message name for the label (required) itemLabelPrefix: The message name prefix for the item labels (required) values: List of allowed values (required) itemAttribs Array of attribute arrays, outer key is the value name (optional)
Returns
string

Definition at line 134 of file DatabaseForm.php.

References $params, MediaWiki\Installer\DatabaseForm\getName(), and MediaWiki\Installer\DatabaseForm\getVar().

◆ getTextBox()

MediaWiki\Installer\DatabaseForm::getTextBox ( $var,
$label,
$attribs = [],
$helpData = "" )
protected

◆ getVar()

◆ setVar()

◆ setVarsFromRequest()

MediaWiki\Installer\DatabaseForm::setVarsFromRequest ( $varNames)
protected

Convenience function to set variables based on form data.

Assumes that variables containing "password" in the name are (potentially fake) passwords.

Parameters
array$varNames
Returns
array

Definition at line 148 of file DatabaseForm.php.

References MediaWiki\Installer\DatabaseForm\getName().

Referenced by MediaWiki\Installer\MysqlConnectForm\submit(), MediaWiki\Installer\MysqlSettingsForm\submit(), MediaWiki\Installer\PostgresConnectForm\submit(), MediaWiki\Installer\SqliteConnectForm\submit(), MediaWiki\Installer\DatabaseConnectForm\submitInstallUserBox(), and MediaWiki\Installer\DatabaseSettingsForm\submitWebUserBox().

Member Data Documentation

◆ $dbInstaller

DatabaseInstaller MediaWiki\Installer\DatabaseForm::$dbInstaller
protected

Definition at line 10 of file DatabaseForm.php.

Referenced by MediaWiki\Installer\DatabaseForm\__construct().

◆ $webInstaller

WebInstaller MediaWiki\Installer\DatabaseForm::$webInstaller
protected

Definition at line 9 of file DatabaseForm.php.

Referenced by MediaWiki\Installer\DatabaseForm\__construct().


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