MediaWiki  1.30.0
OracleInstaller Class Reference

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

Inheritance diagram for OracleInstaller:
Collaboration diagram for OracleInstaller:

Public Member Functions

 createTables ()
 Overload: after this action field info table has to be rebuilt. More...
 
 getConnectForm ()
 Get HTML for a web form that configures this database. More...
 
 getLocalSettings ()
 Get the DBMS-specific options for LocalSettings.php generation. More...
 
 getName ()
 Return the internal name, e.g. More...
 
 getSchemaVars ()
 Override this to provide DBMS-specific schema variables, to be substituted into tables.sql and other schema files. More...
 
 isCompiled ()
 
 needsUpgrade ()
 Determine whether an existing installation of MediaWiki is present in the configured administrative connection. More...
 
 openConnection ()
 Open a connection to the database using the administrative user/password currently defined in the session, without any caching. More...
 
 openSYSDBAConnection ()
 
 preInstall ()
 Allow DB installers a chance to make last-minute changes before installation occurs. More...
 
 setupDatabase ()
 Create the database and return a Status object indicating success or failure. More...
 
 setupUser ()
 
 submitConnectForm ()
 Set variables based on the request array, assuming it was submitted via the form returned by getConnectForm(). More...
 
 submitInstallUserBox ()
 Submit a standard install user fieldset. More...
 
- Public Member Functions inherited from DatabaseInstaller
 __construct ( $parent)
 Construct and initialise parent. More...
 
 checkPrerequisites ()
 Checks for installation prerequisites other than those checked by isCompiled() More...
 
 createExtensionTables ()
 Create the tables for each extension the user enabled. More...
 
 doUpgrade ()
 Perform database upgrades. More...
 
 enableLB ()
 Set up LBFactory so that wfGetDB() etc. More...
 
 getCheckBox ( $var, $label, $attribs=[], $helpData="")
 Get a labelled checkbox to configure a local boolean variable. More...
 
 getConnection ()
 Connect to the database using the administrative user/password currently defined in the session. More...
 
 getGlobalDefaults ()
 Get a name=>value map of MW configuration globals for the default values. More...
 
 getGlobalNames ()
 Get an array of MW configuration globals that will be configured by this class. More...
 
 getInstallUserBox ()
 Get a standard install-user fieldset. More...
 
 getInternalDefaults ()
 Get a name=>value map of internal variables used during installation. More...
 
 getPasswordBox ( $var, $label, $attribs=[], $helpData="")
 Get a labelled password box to configure a local variable. More...
 
 getRadioSet ( $params)
 Get a set of labelled radio buttons. More...
 
 getReadableName ()
 Get the internationalised name for this DBMS. More...
 
 getSchemaPath ( $db)
 Return a path to the DBMS-specific schema file, otherwise default to tables.sql. More...
 
 getSettingsForm ()
 Get HTML for a web form that retrieves settings used for installation. More...
 
 getTextBox ( $var, $label, $attribs=[], $helpData="")
 Get a labelled text box to configure a local variable. More...
 
 getUpdateKeysPath ( $db)
 Return a path to the DBMS-specific update key file, otherwise default to update-keys.sql. More...
 
 getVar ( $var, $default=null)
 Get a variable, taking local defaults into account. More...
 
 getWebUserBox ( $noCreateMsg=false)
 Get a standard web-user fieldset. More...
 
 insertUpdateKeys ()
 Insert update keys into table to prevent running unneded updates. More...
 
 outputHandler ( $string)
 
 populateInterwikiTable ()
 Common function for databases that don't understand the MySQLish syntax of interwiki.sql. More...
 
 preUpgrade ()
 Allow DB installers a chance to make checks before upgrade. More...
 
 setupSchemaVars ()
 Set appropriate schema variables in the current database connection. More...
 
 setVar ( $name, $value)
 Convenience alias for $this->parent->setVar() More...
 
 setVarsFromRequest ( $varNames)
 Convenience function to set variables based on form data. More...
 
 submitSettingsForm ()
 Set variables based on the request array, assuming it was submitted via the form return by getSettingsForm(). More...
 
 submitWebUserBox ()
 Submit the form from getWebUserBox(). More...
 

Static Public Member Functions

static checkConnectStringFormat ( $connect_string)
 Function checks the format of Oracle connect string The actual validity of the string is checked by attempting to connect. More...
 
- Static Public Member Functions inherited from DatabaseInstaller
static meetsMinimumRequirement ( $serverVersion)
 Whether the provided version meets the necessary requirements for this type. More...
 

Static Public Attributes

static $minimumVersion = '9.0.1'
 
- Static Public Attributes inherited from DatabaseInstaller
static string $minimumVersion
 Set by subclasses. More...
 

Protected Attributes

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

Static Protected Attributes

static $notMiniumumVerisonMessage = 'config-oracle-old'
 
- Static Protected Attributes inherited from DatabaseInstaller
static string $notMiniumumVerisonMessage
 Set by subclasses. More...
 

Additional Inherited Members

- Public Attributes inherited from DatabaseInstaller
Database $db = null
 The database connection. More...
 
WebInstaller $parent
 The Installer object. More...
 
- Static Protected Member Functions inherited from DatabaseInstaller
static checkExtension ( $name)
 Convenience function. More...
 

Detailed Description

Class for setting up the MediaWiki database using Oracle.

Since
1.17

Definition at line 33 of file OracleInstaller.php.

Member Function Documentation

◆ checkConnectStringFormat()

static OracleInstaller::checkConnectStringFormat (   $connect_string)
static

Function checks the format of Oracle connect string The actual validity of the string is checked by attempting to connect.

Regex should be able to validate all connect string formats [//](host|tns_name)[:port][/service_name][:POOLED] http://www.orafaq.com/wiki/EZCONNECT

Since
1.22
Parameters
string$connect_string
Returns
bool Whether the connection string is valid.

Definition at line 337 of file OracleInstaller.php.

Referenced by OracleInstallerTest\testCheckConnectStringFormat().

◆ createTables()

OracleInstaller::createTables ( )

Overload: after this action field info table has to be rebuilt.

Returns
Status

Reimplemented from DatabaseInstaller.

Definition at line 284 of file OracleInstaller.php.

References DBO_DDLMODE, DatabaseInstaller\getVar(), and DatabaseInstaller\setupSchemaVars().

◆ getConnectForm()

OracleInstaller::getConnectForm ( )

Get HTML for a web form that configures this database.

Configuration at this time should be the minimum needed to connect and test whether install or upgrade is required.

If this is called, $this->parent can be assumed to be a WebInstaller.

Reimplemented from DatabaseInstaller.

Definition at line 62 of file OracleInstaller.php.

References Html\closeElement(), Html\element(), DatabaseInstaller\getInstallUserBox(), DatabaseInstaller\getTextBox(), DatabaseInstaller\getVar(), DatabaseInstaller\getWebUserBox(), Html\openElement(), text, and wfMessage().

◆ getLocalSettings()

OracleInstaller::getLocalSettings ( )

Get the DBMS-specific options for LocalSettings.php generation.

Returns
string

Reimplemented from DatabaseInstaller.

Definition at line 315 of file OracleInstaller.php.

References DatabaseInstaller\getVar().

◆ getName()

OracleInstaller::getName ( )

Return the internal name, e.g.

'mysql', or 'sqlite'.

Reimplemented from DatabaseInstaller.

Definition at line 54 of file OracleInstaller.php.

◆ getSchemaVars()

OracleInstaller::getSchemaVars ( )

Override this to provide DBMS-specific schema variables, to be substituted into tables.sql and other schema files.

Returns
array

Reimplemented from DatabaseInstaller.

Definition at line 296 of file OracleInstaller.php.

References $name, $vars, as, and DatabaseInstaller\getVar().

◆ isCompiled()

OracleInstaller::isCompiled ( )
Returns
bool Returns true if the client library is compiled in.

Reimplemented from DatabaseInstaller.

Definition at line 58 of file OracleInstaller.php.

References DatabaseInstaller\checkExtension().

◆ needsUpgrade()

OracleInstaller::needsUpgrade ( )

Determine whether an existing installation of MediaWiki is present in the configured administrative connection.

Returns true if there is such a wiki, false if the database doesn't exist.

Traditionally, this is done by testing for the existence of either the revision table or the cur table.

Returns
bool

Reimplemented from DatabaseInstaller.

Definition at line 207 of file OracleInstaller.php.

References DatabaseInstaller\getVar().

◆ openConnection()

OracleInstaller::openConnection ( )

Open a connection to the database using the administrative user/password currently defined in the session, without any caching.

Returns a status object. On success, the status object will contain a Database object in its value member.

Returns
Status

Reimplemented from DatabaseInstaller.

Definition at line 167 of file OracleInstaller.php.

References DatabaseInstaller\$db, $e, DatabaseInstaller\getVar(), and StatusValue\newGood().

Referenced by setupUser().

◆ openSYSDBAConnection()

OracleInstaller::openSYSDBAConnection ( )

◆ preInstall()

OracleInstaller::preInstall ( )

Allow DB installers a chance to make last-minute changes before installation occurs.

This happens before setupDatabase() or createTables() is called, but long after the constructor. Helpful for things like modifying setup steps :)

Reimplemented from DatabaseInstaller.

Definition at line 216 of file OracleInstaller.php.

◆ setupDatabase()

OracleInstaller::setupDatabase ( )

Create the database and return a Status object indicating success or failure.

Returns
Status

Reimplemented from DatabaseInstaller.

Definition at line 225 of file OracleInstaller.php.

References StatusValue\newGood().

◆ setupUser()

◆ submitConnectForm()

OracleInstaller::submitConnectForm ( )

Set variables based on the request array, assuming it was submitted via the form returned by getConnectForm().

Validate the connection settings by attempting to connect with them.

If this is called, $this->parent can be assumed to be a WebInstaller.

Returns
Status

Reimplemented from DatabaseInstaller.

Definition at line 96 of file OracleInstaller.php.

References DatabaseInstaller\getConnection(), DatabaseInstaller\getVar(), StatusValue\newGood(), openSYSDBAConnection(), DatabaseInstaller\setVarsFromRequest(), submitInstallUserBox(), and DatabaseInstaller\submitWebUserBox().

◆ submitInstallUserBox()

OracleInstaller::submitInstallUserBox ( )

Submit a standard install user fieldset.

Returns
Status

Reimplemented from DatabaseInstaller.

Definition at line 89 of file OracleInstaller.php.

References DatabaseInstaller\getVar(), and StatusValue\newGood().

Referenced by submitConnectForm().

Member Data Documentation

◆ $connError

OracleInstaller::$connError = null
protected

Definition at line 52 of file OracleInstaller.php.

◆ $globalNames

OracleInstaller::$globalNames
protected
Initial value:
= [
'wgDBserver',
'wgDBname',
'wgDBuser',
'wgDBpassword',
'wgDBprefix',
]

Definition at line 35 of file OracleInstaller.php.

◆ $internalDefaults

OracleInstaller::$internalDefaults
protected
Initial value:
= [
'_OracleDefTS' => 'USERS',
'_OracleTempTS' => 'TEMP',
'_InstallUser' => 'SYSTEM',
]

Definition at line 43 of file OracleInstaller.php.

◆ $minimumVersion

OracleInstaller::$minimumVersion = '9.0.1'
static

Definition at line 49 of file OracleInstaller.php.

◆ $notMiniumumVerisonMessage

OracleInstaller::$notMiniumumVerisonMessage = 'config-oracle-old'
staticprotected

Definition at line 50 of file OracleInstaller.php.


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