/**
* 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() ) {
*
* 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
/**
* Get a URL for submission back to the same script.
*
- * @param $query: Array
+ * @param $query array
* @return string
*/
public function getUrl( $query = array() ) {
* 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' );
* 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' );
* @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 =
/**
* Get small text indented help for a preceding form field.
* Parameters like wfMsg().
+ *
+ * @return string
*/
public function getHelpBox( $msg /*, ... */ ) {
$args = func_get_args();
/**
* 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 ) == '' ) {
* 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'] ) ) {
* 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'] ) ) {
* 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'] ) ) {
* 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'] ) ) {
* 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'] ) ) {
*
* @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();
/**
* Helper for Installer::docLink()
+ *
+ * @return string
*/
protected function getDocUrl( $page ) {
$url = "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page );
/**
* Extension tag hook for a documentation link.
+ *
+ * @return string
*/
public function docLink( $linkText, $attribs, $parser ) {
$url = $this->getDocUrl( $attribs['href'] );
/**
* Helper for "Download LocalSettings" link on WebInstall_Complete
+ *
* @return String Html for download link
*/
public function downloadLinkHook( $text, $attribs, $parser ) {