Manual:Code

This page describes the primary source files (classes) / objects of the MediaWiki code.

There's also an automatically generated version of this documentation.

index.php

 * on SVN

Main access point for the MediaWiki software. It handles most of the requests. See Manual:Index.php.

api.php

 * on SVN

External access point for the API. See API page for in depth description.

img_auth.php

 * on SVN

Script that only serve images to logged in users. To configure the wiki to use that script, see Manual:Image Authorisation.

opensearch_desc.php

 * on SVN

Returns a OpenSearch description document (see http://www.opensearch.org/) that points to the search engines of the wiki.

profileinfo.php

 * on SVN

Allow users to see the profiling information that are stored in the database. See How to debug.

redirect.php

 * on SVN

Script that only redirect to the article passed in the wpDropdown parameter of the request.

thumb.php

 * on SVN

Script used to resize images.

trackback.php

 * on SVN

Allow to add a new trackback to the database.

Directory /includes/
This directory stores all files needed by MediaWiki.

Article.php

 * on SVN

Contains the Article class. It represents an article of the wiki, can modify the article (edit, deletion, ...) and maintains state such as text (in wikitext format), flags, etc. See Manual:Article.php.

LinkCache.php

 * on SVN

Keeps information on existence of articles. See LINKCACHE.TXT.

Linker.php

 * on SVN

Linker is the parent class for the Skin class. It contains methods to create internal, external or image links. To use this class, use.

OutputPage.php

 * on SVN

Hold HTML and wikitext parsing. Will also generate the  element or part of it. See OutputPage.php.

Pager.php

 * on SVN

Contains the IndexPager class used for paging results of MySQL queries. See Manual:Pager.php.

Parser.php

 * on SVN (directory "/includes/parser/" since 1.13)

This file defines the parser object used to convert wikitext to HTML. See Manual:Parser.php.

Setup.php

 * on SVN

It included some commonly used files and create the global object variables so that MediaWiki can work. See Manual:Setup.php.

Skin.php

 * on SVN

Encapsulates a "look and feel" for the wiki. See Manual:Skin.php.

Title.php

 * on SVN

Represents the title of an article, and does all the work of translating among various forms such as plain text, URL, database key, etc. For convenience, and for historical reasons, it also represents a few features of articles that don't involve their text, such as access rights.

User.php

 * on SVN

Encapsulates the state of the user viewing/using the site. Can be queried for things like the user's settings, name, etc. Handles the details of getting and saving to the user table of the database, and dealing with sessions and cookies.

WebRequest.php

 * on SVN

This file contains the definition of the class WebRequest. See Manual:WebRequest.php.

WebStart.php

 * on SVN

It does the initial setup for a web request: security checks, loads LocalSettings.php and Setup.php. See Manual:WebStart.php.

Wiki.php

 * on SVN

This file consists of the definition of the class MediaWiki. See Manual:Wiki.php.

Directory /languages/
This directory contains files used for localisation and internationalisation.

Language.php

 * on SVN

Contains the Language class, it represents the language used for incidental text, and also has some character encoding functions and other locale stuff. Two globals contain an instance of this class: $wgContLang for the site language and $wgLang for the user language.

Directory /maintenance/
This directory contains maintenace scrpits that must be run from a command line interface.

See Manual:Maintenance scripts for an overview of those scripts.

Directory /skins/
This directory contain all skins classes, JavaScripts, CSS and some images used by that skins.