Documentation
authorSam Reed <reedy@users.mediawiki.org>
Mon, 2 May 2011 16:58:29 +0000 (16:58 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 2 May 2011 16:58:29 +0000 (16:58 +0000)
includes/db/LBFactory_Single.php
includes/installer/CliInstaller.php
includes/installer/DatabaseInstaller.php
includes/installer/Installer.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerOutput.php
includes/installer/WebInstallerPage.php

index e8b5fe8..a0089d5 100644 (file)
@@ -7,7 +7,7 @@ class LBFactory_Single extends LBFactory {
        protected $lb;
 
        /**
-        * @param $conf An associative array with one member:
+        * @param $conf array An associative array with one member:
         *  - connection: The DatabaseBase connection object
         */
        function __construct( $conf ) {
index 0a99937..66e779e 100644 (file)
@@ -131,6 +131,8 @@ class CliInstaller extends Installer {
        }
 
        /**
+        * @param $params array
+        *
         * @return string
         */
        protected function getMessageText( $params ) {
index 3594f35..7ea5296 100644 (file)
@@ -365,6 +365,8 @@ abstract class DatabaseInstaller {
 
        /**
         * Get a labelled text box to configure a local variable.
+        *
+        * @return string
         */
        public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) {
                $name = $this->getName() . '_' . $var;
@@ -385,6 +387,8 @@ abstract class DatabaseInstaller {
        /**
         * Get a labelled password box to configure a local variable.
         * Implements password hiding.
+        *
+        * @return string
         */
        public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) {
                $name = $this->getName() . '_' . $var;
@@ -404,6 +408,8 @@ abstract class DatabaseInstaller {
 
        /**
         * Get a labelled checkbox to configure a local boolean variable.
+        *
+        * @return string
         */
        public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) {
                $name = $this->getName() . '_' . $var;
index ba01145..58ce470 100644 (file)
@@ -354,6 +354,8 @@ abstract class Installer {
 
        /**
         * Get a list of known DB types.
+        *
+        * @return array
         */
        public static function getDBTypes() {
                return self::$dbTypes;
@@ -557,6 +559,9 @@ abstract class Installer {
                return $html;
        }
 
+       /**
+        * @return ParserOptions
+        */
        public function getParserOptions() {
                return $this->parserOptions;
        }
@@ -573,6 +578,10 @@ abstract class Installer {
        /**
         * Install step which adds a row to the site_stats table with appropriate
         * initial values.
+        *
+        * @param $installer DatabaseInstaller
+        *
+        * @return Status
         */
        public function populateSiteStats( DatabaseInstaller $installer ) {
                $status = $installer->getConnection();
index 0d00726..a751d03 100644 (file)
@@ -296,6 +296,8 @@ class WebInstaller extends Installer {
 
        /**
         * Start the PHP session. This may be called before execute() to start the PHP session.
+        *
+        * @return bool
         */
        public function startSession() {
                if( wfIniGetBool( 'session.auto_start' ) || session_id() ) {
@@ -321,6 +323,8 @@ class WebInstaller extends Installer {
         *
         * This is used by mw-config/index.php to prevent multiple installations of MW
         * on the same cookie domain from interfering with each other.
+        *
+        * @return string
         */
        public function getFingerprint() {
                // Get the base URL of the installation
@@ -386,7 +390,7 @@ class WebInstaller extends Installer {
        /**
         * Get a URL for submission back to the same script.
         *
-        * @param $query: Array
+        * @param $query array
         * @return string
         */
        public function getUrl( $query = array() ) {
@@ -580,6 +584,8 @@ class WebInstaller extends Installer {
         * Get HTML for an error box with an icon.
         *
         * @param $text String: wikitext, get this with wfMsgNoTrans()
+        *
+        * @return string
         */
        public function getErrorBox( $text ) {
                return $this->getInfoBox( $text, 'critical-32.png', 'config-error-box' );
@@ -589,6 +595,8 @@ class WebInstaller extends Installer {
         * Get HTML for a warning box with an icon.
         *
         * @param $text String: wikitext, get this with wfMsgNoTrans()
+        *
+        * @return string
         */
        public function getWarningBox( $text ) {
                return $this->getInfoBox( $text, 'warning-32.png', 'config-warning-box' );
@@ -600,6 +608,8 @@ class WebInstaller extends Installer {
         * @param $text String: wikitext, get this with wfMsgNoTrans()
         * @param $icon String: icon name, file in skins/common/images
         * @param $class String: additional class name to add to the wrapper div
+        *
+        * @return string
         */
        public function getInfoBox( $text, $icon = 'info-32.png', $class = false ) {
                $s =
@@ -623,6 +633,8 @@ class WebInstaller extends Installer {
        /**
         * Get small text indented help for a preceding form field.
         * Parameters like wfMsg().
+        *
+        * @return string
         */
        public function getHelpBox( $msg /*, ... */ ) {
                $args = func_get_args();
@@ -678,6 +690,8 @@ class WebInstaller extends Installer {
        /**
         * Label a control by wrapping a config-input div around it and putting a
         * label before it.
+        *
+        * @return string
         */
        public function label( $msg, $forId, $contents, $helpData = "" ) {
                if ( strval( $msg ) == '' ) {
@@ -717,6 +731,8 @@ class WebInstaller extends Installer {
         *      controlName: The name for the input element (optional)
         *      value:      The current value of the variable (optional)
         *      help:           The html for the help text (optional)
+        *
+        * @return string
         */
        public function getTextBox( $params ) {
                if ( !isset( $params['controlName'] ) ) {
@@ -762,6 +778,8 @@ class WebInstaller extends Installer {
         *      controlName: The name for the input element (optional)
         *      value:      The current value of the variable (optional)
         *      help:           The html for the help text (optional)
+        *
+        * @return string
         */
        public function getTextArea( $params ) {
                if ( !isset( $params['controlName'] ) ) {
@@ -809,6 +827,8 @@ class WebInstaller extends Installer {
         *      controlName: The name for the input element (optional)
         *      value:      The current value of the variable (optional)
         *      help:           The html for the help text (optional)
+        *
+        * @return string
         */
        public function getPasswordBox( $params ) {
                if ( !isset( $params['value'] ) ) {
@@ -836,6 +856,8 @@ class WebInstaller extends Installer {
         *      controlName: The name for the input element (optional)
         *      value:      The current value of the variable (optional)
         *      help:           The html for the help text (optional)
+        *
+        * @return string
         */
        public function getCheckBox( $params ) {
                if ( !isset( $params['controlName'] ) ) {
@@ -889,6 +911,8 @@ class WebInstaller extends Installer {
         *      controlName:    The name for the input element (optional)
         *      value:          The current value of the variable (optional)
         *      help:           The html for the help text (optional)
+        *
+        * @return string
         */
        public function getRadioSet( $params ) {
                if ( !isset( $params['controlName']  ) ) {
@@ -963,6 +987,8 @@ class WebInstaller extends Installer {
         *
         * @param $varNames Array
         * @param $prefix String: the prefix added to variables to obtain form names
+        *
+        * @return array
         */
        public function setVarsFromRequest( $varNames, $prefix = 'config_' ) {
                $newValues = array();
@@ -988,6 +1014,8 @@ class WebInstaller extends Installer {
 
        /**
         * Helper for Installer::docLink()
+        *
+        * @return string
         */
        protected function getDocUrl( $page ) {
                $url = "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page );
@@ -1001,6 +1029,8 @@ class WebInstaller extends Installer {
 
        /**
         * Extension tag hook for a documentation link.
+        *
+        * @return string
         */
        public function docLink( $linkText, $attribs, $parser ) {
                $url = $this->getDocUrl( $attribs['href'] );
@@ -1011,6 +1041,7 @@ class WebInstaller extends Installer {
        
        /**
         * Helper for "Download LocalSettings" link on WebInstall_Complete
+        * 
         * @return String Html for download link
         */
        public function downloadLinkHook( $text, $attribs, $parser  ) {
index cb708d1..443cf5a 100644 (file)
@@ -139,22 +139,33 @@ class WebInstallerOutput {
                }
        }
 
+       /**
+        * @return string
+        */
        public function getDir() {
                global $wgLang;
-               if( !is_object( $wgLang ) || !$wgLang->isRtl() )
+               if( !is_object( $wgLang ) || !$wgLang->isRtl() ) {
                        return 'ltr';
-               else
+               } else {
                        return 'rtl';
+               }
        }
 
+       /**
+        * @return string
+        */
        public function getLanguageCode() {
                global $wgLang;
-               if( !is_object( $wgLang ) )
+               if( !is_object( $wgLang ) ) {
                        return 'en';
-               else
+               } else {
                        return $wgLang->getCode();
+               }
        }
 
+       /**
+        * @return array
+        */
        public function getHeadAttribs() {
                return array(
                        'dir' => $this->getDir(),
index 1d3daf2..64b64d6 100644 (file)
@@ -103,6 +103,8 @@ abstract class WebInstallerPage {
         * Get the starting tags of a fieldset.
         *
         * @param $legend String: message name
+        *
+        * @return string
         */
        protected function getFieldsetStart( $legend ) {
                return "\n<fieldset><legend>" . wfMsgHtml( $legend ) . "</legend>\n";
@@ -110,6 +112,8 @@ abstract class WebInstallerPage {
 
        /**
         * Get the end tag of a fieldset.
+        *
+        * @returns string
         */
        protected function getFieldsetEnd() {
                return "</fieldset>\n";
@@ -198,6 +202,8 @@ class WebInstaller_Language extends WebInstallerPage {
 
        /**
         * Get a <select> for selecting languages.
+        *
+        * @return string
         */
        public function getLanguageSelector( $name, $label, $selectedCode ) {
                global $wgDummyLanguageCodes;