/**
* Minimum memory size in MB.
*
- * @var integer
+ * @var int
*/
protected $minMemorySize = 50;
* The parameters are like parameters to wfMessage().
* The messages will be in wikitext format, which will be converted to an
* output format such as HTML or text before being sent to the user.
- * @param $msg
+ * @param string $msg
*/
abstract public function showMessage( $msg /*, ... */ );
/**
* Same as showMessage(), but for displaying errors
- * @param $msg
+ * @param string $msg
*/
abstract public function showError( $msg /*, ... */ );
/**
* Show a message to the installing user by using a Status object
- * @param $status Status
+ * @param Status $status
*/
abstract public function showStatusMessage( Status $status );
* Constructor, always call this from child classes.
*/
public function __construct() {
- global $wgExtensionMessagesFiles, $wgUser;
+ global $wgMessagesDirs, $wgUser;
// Disable the i18n cache and LoadBalancer
Language::getLocalisationCache()->disableBackend();
LBFactory::disableBackend();
- // Load the installer's i18n file.
- $wgExtensionMessagesFiles['MediawikiInstaller'] =
- __DIR__ . '/Installer.i18n.php';
+ // Load the installer's i18n.
+ $wgMessagesDirs['MediawikiInstaller'] = __DIR__ . '/i18n';
// Having a user with id = 0 safeguards us from DB access via User::loadOptions().
$wgUser = User::newFromId( 0 );
/**
* Set a MW configuration variable, or internal installer configuration variable.
*
- * @param $name String
- * @param $value Mixed
+ * @param string $name
+ * @param mixed $value
*/
public function setVar( $name, $value ) {
$this->settings[$name] = $value;
* The defaults come from $GLOBALS (ultimately DefaultSettings.php).
* Installer variables are typically prefixed by an underscore.
*
- * @param $name String
- * @param $default Mixed
+ * @param string $name
+ * @param mixed $default
*
* @return mixed
*/
/**
* Get an instance of DatabaseInstaller for the specified DB type.
*
- * @param $type Mixed: DB installer for which is needed, false to use default.
+ * @param mixed $type DB installer for which is needed, false to use default.
*
* @return DatabaseInstaller
*/
/**
* Determine if LocalSettings.php exists. If it does, return its variables.
*
- * @return Array
+ * @return array
*/
public static function getExistingLocalSettings() {
global $IP;
* This is a security mechanism to avoid compromise of the password in the
* event of session ID compromise.
*
- * @param $realPassword String
+ * @param string $realPassword
*
* @return string
*/
* Set a variable which stores a password, except if the new value is a
* fake password in which case leave it as it is.
*
- * @param $name String
- * @param $value Mixed
+ * @param string $name
+ * @param mixed $value
*/
public function setPassword( $name, $value ) {
if ( !preg_match( '/^\*+$/', $value ) ) {
* whatever, this function is guarded to catch the attempted DB access and to present
* some fallback text.
*
- * @param $text String
- * @param $lineStart Boolean
- * @return String
+ * @param string $text
+ * @param bool $lineStart
+ * @return string
*/
public function parse( $text, $lineStart = false ) {
global $wgParser;
* Install step which adds a row to the site_stats table with appropriate
* initial values.
*
- * @param $installer DatabaseInstaller
+ * @param DatabaseInstaller $installer
*
* @return Status
*/
/**
* Helper function to be called from envCheckServer()
- * @return String
+ * @return string
*/
abstract protected function envGetDefaultServer();
/**
* Convert a hex string representing a Unicode code point to that code point.
- * @param $c String
+ * @param string $c
* @return string
*/
protected function unicodeChar( $c ) {
* of known Unix-like defaults, as well as the PATH environment variable
* (which should maybe make it work for Windows?)
*
- * @return Array
+ * @return array
*/
protected static function getPossibleBinPaths() {
return array_merge(
*
* @param string $path path to search
* @param array $names of executable names
- * @param $versionInfo Boolean false or array with two members:
- * 0 => Command to run for version check, with $1 for the full executable name
- * 1 => String to compare the output with
+ * @param array|bool $versionInfo False or array with two members:
+ * 0 => Command to run for version check, with $1 for the full executable name
+ * 1 => String to compare the output with
*
* If $versionInfo is not false, only executables with a version
* matching $versionInfo[1] will be returned.
* @see locateExecutable()
* @param array $names Array of possible names.
* @param array|bool $versionInfo Default: false or array with two members:
- * 0 => Command to run for version check, with $1 for the full executable name
- * 1 => String to compare the output with
+ * 0 => Command to run for version check, with $1 for the full executable name
+ * 1 => String to compare the output with
*
* If $versionInfo is not false, only executables with a version
* matching $versionInfo[1] will be returned.
* Checks if scripts located in the given directory can be executed via the given URL.
*
* Used only by environment checks.
- * @param $dir string
- * @param $url string
+ * @param string $dir
+ * @param string $url
* @return bool|int|string
*/
public function dirIsExecutable( $dir, $url ) {
/**
* ParserOptions are constructed before we determined the language, so fix it
*
- * @param $lang Language
+ * @param Language $lang
*/
public function setParserLanguage( $lang ) {
$this->parserOptions->setTargetLanguage( $lang );
/**
* Overridden by WebInstaller to provide lastPage parameters.
- * @param $page string
+ * @param string $page
* @return string
*/
protected function getDocUrl( $page ) {
* There must be a config-install-$name message defined per step, which will
* be shown on install.
*
- * @param $installer DatabaseInstaller so we can make callbacks
+ * @param DatabaseInstaller $installer DatabaseInstaller so we can make callbacks
* @return array
*/
protected function getInstallSteps( DatabaseInstaller $installer ) {
* @param array $startCB A callback array for the beginning of each step
* @param array $endCB A callback array for the end of each step
*
- * @return Array of Status objects
+ * @return array Array of Status objects
*/
public function performInstallation( $startCB, $endCB ) {
$installResults = array();
* Generate a secret value for variables using our CryptRand generator.
* Produce a warning if the random source was insecure.
*
- * @param $keys Array
+ * @param array $keys
* @return Status
*/
protected function doGenerateKeys( $keys ) {
}
/**
- * @param $s Status
+ * @param Status $s
*/
private function subscribeToMediaWikiAnnounce( Status $s ) {
$params = array(
/**
* Insert Main Page with default content.
*
- * @param $installer DatabaseInstaller
+ * @param DatabaseInstaller $installer
* @return Status
*/
protected function createMainpage( DatabaseInstaller $installer ) {
*
* @param array $callback A valid installation callback array, in this form:
* array( 'name' => 'some-unique-name', 'callback' => array( $obj, 'function' ) );
- * @param string $findStep the step to find. Omit to put the step at the beginning
+ * @param string $findStep The step to find. Omit to put the step at the beginning
*/
public function addInstallStep( $callback, $findStep = 'BEGINNING' ) {
$this->extraInstallSteps[$findStep][] = $callback;