Doc tweaks:
authorNick Jenkins <nickj@users.mediawiki.org>
Tue, 24 Apr 2007 06:53:31 +0000 (06:53 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Tue, 24 Apr 2007 06:53:31 +0000 (06:53 +0000)
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.

29 files changed:
includes/AjaxDispatcher.php
includes/BagOStuff.php
includes/DjVuImage.php
includes/Exif.php
includes/Feed.php
includes/Image.php
includes/ImageGallery.php
includes/ImagePage.php
includes/Linker.php
includes/MediaTransformOutput.php
includes/MimeMagic.php
includes/ProtectionForm.php
includes/RawPage.php
includes/SiteConfiguration.php
includes/Skin.php
includes/SkinTemplate.php
includes/SpecialContributions.php
includes/SpecialDoubleRedirects.php
includes/SpecialEmailuser.php
includes/User.php
includes/WebRequest.php
includes/media/BMP.php
includes/media/Bitmap.php
includes/media/DjVu.php
includes/media/Generic.php
includes/media/SVG.php
includes/memcached-client.php
includes/normal/CleanUpTest.php
includes/normal/UtfNormal.php

index 90f68ec..ca12902 100644 (file)
@@ -11,7 +11,7 @@ if ( ! $wgUseAjax ) {
 require_once( 'AjaxFunctions.php' );
 
 /**
- * @todo Document - e.g. Provide top-level description of this class.
+ * Object-Oriented Ajax functions.
  * @addtogroup Ajax
  */
 class AjaxDispatcher {
index cc23936..2a04b9d 100644 (file)
@@ -494,7 +494,6 @@ class TurckBagOStuff extends BagOStuff {
  * This is a wrapper for APC's shared memory functions
  *
  */
-
 class APCBagOStuff extends BagOStuff {
        function get($key) {
                $val = apc_fetch($key);
@@ -553,6 +552,9 @@ class eAccelBagOStuff extends BagOStuff {
        }
 }
 
+/**
+ * @todo document
+ */
 class DBABagOStuff extends BagOStuff {
        var $mHandler, $mFile, $mReader, $mWriter, $mDisabled;
        
index cd85147..1e42356 100644 (file)
@@ -28,6 +28,8 @@
  *
  * File format docs are available in source package for DjVuLibre:
  * http://djvulibre.djvuzone.org/
+ *
+ * @addtogroup Media
  */
 class DjVuImage {
        function __construct( $filename ) {
index f9de28a..3a06ca1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @addtogroup Metadata
+ * @addtogroup Media
  *
  * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
@@ -26,7 +26,7 @@
 
 /**
  * @todo document (e.g. one-sentence class-overview description)
- * @addtogroup Metadata
+ * @addtogroup Media
  */
 class Exif {
        //@{
@@ -604,7 +604,7 @@ class Exif {
 
 /**
  * @todo document (e.g. one-sentence class-overview description)
- * @addtogroup Metadata
+ * @addtogroup Media
  */
 class FormatExif {
        /**
index a77dcbc..ed4343c 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 /**
- * @todo document (needs one-sentence top-level class description + function descriptions).
+ * A base class for basic support for outputting syndication feeds in RSS and other formats.
  */
 class FeedItem {
        /**#@+
index c09483e..ffe3802 100644 (file)
@@ -21,6 +21,8 @@ define( 'MW_IMAGE_VERSION', 1 );
  *
  * Provides methods to retrieve paths (physical, logical, URL),
  * to generate thumbnails or for uploading.
+ *
+ * @addtogroup Media
  */
 class Image
 {
@@ -2003,6 +2005,10 @@ class Image
 
 } //class
 
+
+/**
+ * @addtogroup Media
+ */
 class ArchivedFile
 {
        /**
index 036d717..fba7714 100644 (file)
@@ -10,6 +10,7 @@ if ( ! defined( 'MEDIAWIKI' ) )
  *
  * Add images to the gallery using add(), then render that list to HTML using toHTML().
  *
+ * @addtogroup Media
  */
 class ImageGallery
 {
index 7d3414a..80375b9 100644 (file)
@@ -10,6 +10,8 @@ if( !defined( 'MEDIAWIKI' ) )
 
 /**
  * Special handling for image description pages
+ *
+ * @addtogroup Media
  */
 class ImagePage extends Article {
 
@@ -710,6 +712,7 @@ END
 
 /**
  * @todo document
+ * @addtogroup Media
  */
 class ImageHistoryList {
        function ImageHistoryList( &$skin ) {
index 190efeb..e769ec0 100644 (file)
@@ -4,14 +4,12 @@
  * These functions are used for primarily page content:
  * links, embedded images, table of contents. Links are
  * also used in the skin.
- */
-
-/**
  * For the moment, Skin is a descendent class of Linker.
  * In the future, it should probably be further split
  * so that ever other bit of the wiki doesn't have to
  * go loading up Skin to get at it.
  *
+ * @addtogroup Skins
  */
 class Linker {
        function __construct() {}
index 5004fcc..60057e3 100644 (file)
@@ -2,6 +2,8 @@
 
 /**
  * Base class for the output of MediaHandler::doTransform() and Image::transform().
+ *
+ * @addtogroup Media
  */
 abstract class MediaTransformOutput {
        /**
@@ -63,6 +65,8 @@ abstract class MediaTransformOutput {
 
 /**
  * Media transform output for images
+ *
+ * @addtogroup Media
  */
 class ThumbnailImage extends MediaTransformOutput {
        /**
@@ -107,6 +111,8 @@ class ThumbnailImage extends MediaTransformOutput {
 
 /**
  * Basic media transform error class
+ *
+ * @addtogroup Media
  */
 class MediaTransformError extends MediaTransformOutput {
        var $htmlMsg, $textMsg, $width, $height, $url, $path;
@@ -146,6 +152,8 @@ class MediaTransformError extends MediaTransformOutput {
 
 /**
  * Shortcut class for parameter validation errors
+ *
+ * @addtogroup Media
  */
 class TransformParameterError extends MediaTransformError {
        function __construct( $params ) {
index df7a474..db35535 100644 (file)
@@ -71,12 +71,13 @@ if ($wgLoadFileinfoExtension) {
        if(!extension_loaded('fileinfo')) dl('fileinfo.' . PHP_SHLIB_SUFFIX);
 }
 
-/** Implements functions related to mime types such as detection and mapping to
-* file extension,
-*
-* Instances of this class are stateles, there only needs to be one global instance
-* of MimeMagic. Please use MimeMagic::singleton() to get that instance.
-*/
+/** 
+ * Implements functions related to mime types such as detection and mapping to
+ * file extension.
+ *
+ * Instances of this class are stateles, there only needs to be one global instance
+ * of MimeMagic. Please use MimeMagic::singleton() to get that instance.
+ */
 class MimeMagic {
 
        /**
index 4c4f2b3..3cafbd5 100644 (file)
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
- *
- * @addtogroup SpecialPage
  */
 
 /**
  * @todo document, briefly.
+ * @addtogroup SpecialPage
  */
 class ProtectionForm {
        var $mRestrictions = array();
index 2b2a5ce..9348482 100644 (file)
@@ -10,7 +10,8 @@
  */
 
 /**
- * @todo document
+ * A simple method to retrieve the plain source of an article,
+ * using "action=raw" in the GET request string.
  */
 class RawPage {
        var $mArticle, $mTitle, $mRequest;
index 36c6aa8..0968460 100644 (file)
@@ -1,8 +1,4 @@
 <?php
-/**
- * This is a class used to hold configuration settings, particularly for multi-wiki sites.
- *
- */
 
 /**
  * The include paths change after this file is included from commandLine.inc,
@@ -12,6 +8,10 @@
 if (!defined('SITE_CONFIGURATION')) {
 define('SITE_CONFIGURATION', 1);
 
+/**
+ * This is a class used to hold configuration settings, particularly for multi-wiki sites.
+ *
+ */
 class SiteConfiguration {
        var $suffixes = array();
        var $wikis = array();
index 74a570c..0ca95f7 100644 (file)
@@ -2,16 +2,15 @@
 if ( ! defined( 'MEDIAWIKI' ) )
        die( 1 );
 
-/**
- *
- * @addtogroup Skins
- */
-
 # See skin.txt
 
 /**
  * The main skin class that provide methods and properties for all other skins.
  * This base class is also the "Standard" skin.
+ *
+ * See docs/skin.txt for more information.
+ *
+ * @addtogroup Skins
  */
 class Skin extends Linker {
        /**#@+
index 1c0a3dc..cddd219 100644 (file)
@@ -17,24 +17,12 @@ if ( ! defined( 'MEDIAWIKI' ) )
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
-/**
- * Template-filler skin base class
- * Formerly generic PHPTal (http://phptal.sourceforge.net/) skin
- * Based on Brion's smarty skin
- * Copyright (C) Gabriel Wicke -- http://www.aulinx.de/
- *
- * Todo: Needs some serious refactoring into functions that correspond
- * to the computations individual esi snippets need. Most importantly no body
- * parsing for most of those of course.
- *
- * @addtogroup Skins
- */
-
 /**
  * Wrapper object for MediaWiki's localization functions,
  * to be passed to the template engine.
  *
  * @private
+ * @addtogroup Skins
  */
 class MediaWiki_I18N {
        var $_context = array();
@@ -66,7 +54,16 @@ class MediaWiki_I18N {
 }
 
 /**
- * @todo document with one-sentence top-level class description.
+ * Template-filler skin base class
+ * Formerly generic PHPTal (http://phptal.sourceforge.net/) skin
+ * Based on Brion's smarty skin
+ * @copyright Copyright © Gabriel Wicke -- http://www.aulinx.de/
+ *
+ * @todo Needs some serious refactoring into functions that correspond
+ * to the computations individual esi snippets need. Most importantly no body
+ * parsing for most of those of course.
+ *
+ * @addtogroup Skins
  */
 class SkinTemplate extends Skin {
        /**#@+
index eb857cf..0114c8e 100644 (file)
@@ -3,6 +3,12 @@
  * @addtogroup SpecialPage
  */
 
+/**
+ * Finds the user's contributions in the database that match the specified
+ * offset, limit, and namespace.
+ *
+ * @addtogroup SpecialPage
+ */
 class ContribsFinder {
        var $username, $offset, $limit, $namespace;
        var $dbr;
@@ -180,7 +186,7 @@ class ContribsFinder {
                $this->dbr->freeResult( $res );
                return $contribs;
        }
-};
+}
 
 /**
  * Special page "user contributions".
index 2a7d172..e7b355c 100644 (file)
@@ -6,7 +6,7 @@
 
 /**
  * A special page listing redirects to redirecting page.
- * The software will not procede double redirects automaticly to prevent loops.
+ * The software will automatically not follow double redirects, to prevent loops.
  * @addtogroup SpecialPage
  */
 class DoubleRedirectsPage extends PageQueryPage {
index b49812b..900a2c3 100644 (file)
@@ -65,7 +65,7 @@ function wfSpecialEmailuser( $par ) {
 }
 
 /**
- * @todo document
+ * Implements the Special:Emailuser web interface, and invokes userMailer for sending the email message.
  * @addtogroup SpecialPage
  */
 class EmailUserForm {
index d0c2db6..cfb665a 100644 (file)
@@ -24,7 +24,14 @@ class PasswordError extends MWException {
 }
 
 /**
- *
+ * The User object encapsulates all of the user-specific settings (user_id,
+ * name, rights, password, email address, options, last login time). Client
+ * classes use the getXXX() functions to access these fields. These functions
+ * do all the work of determining whether the user is logged in,
+ * whether the requested option can be satisfied from cookies or
+ * whether a database query is needed. Most of the settings needed
+ * for rendering normal pages are set in the cookie to minimize use
+ * of the database.
  */
 class User {
 
index 1962ce9..53273a2 100644 (file)
@@ -140,7 +140,9 @@ class WebRequest {
 
        /**
         * Fetch a scalar from the input or return $default if it's not set.
-        * Returns a string. Arrays are discarded.
+        * Returns a string. Arrays are discarded. Useful for 
+        * non-freeform text inputs (e.g. predefined internal text keys 
+        * selected by a drop-down menu). For freeform input, see getText().
         *
         * @param string $name
         * @param string $default optional default (or NULL)
@@ -250,7 +252,9 @@ class WebRequest {
         * Fetch a text string from the given array or return $default if it's not
         * set. \r is stripped from the text, and with some language modules there
         * is an input transliteration applied. This should generally be used for
-        * form <textarea> and <input> fields.
+        * form <textarea> and <input> fields. Used for user-supplied freeform text
+        * input (for which input transformations may be required - e.g. Esperanto 
+        * x-coding).
         *
         * @param string $name
         * @param string $default optional
index e867819..9917856 100644 (file)
@@ -3,6 +3,8 @@
  * Handler for Microsoft bitmap format (bmp). It inherits most of the methods
  * from ImageHandler, some of them had to be overriden cause gd does not
  * support this format.
+ *
+ * @addtogroup Media
  */
 class BmpHandler extends BitmapHandler {
 
index 329df86..5235521 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @addtogroup Media
+ */
 class BitmapHandler extends ImageHandler {
        function normaliseParams( $image, &$params ) {
                global $wgMaxImageArea;
index a04de96..43b6540 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @addtogroup Media
+ */
 class DjVuHandler extends ImageHandler {
        function isEnabled() {
                global $wgDjvuRenderer, $wgDjvuDump, $wgDjvuToXML;
index ba4e32e..d45aa50 100644 (file)
@@ -6,6 +6,8 @@
 
 /**
  * Base media handler class
+ *
+ * @addtogroup Media
  */
 abstract class MediaHandler {
        const TRANSFORM_LATER = 1;
@@ -160,6 +162,8 @@ abstract class MediaHandler {
 
 /**
  * Media handler abstract base class for images
+ *
+ * @addtogroup Media
  */
 abstract class ImageHandler extends MediaHandler {
        function validateParam( $name, $value ) {
index 407760d..d311232 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 
+/**
+ * @addtogroup Media
+ */
 class SvgHandler extends ImageHandler {
        function isEnabled() {
                global $wgSVGConverters, $wgSVGConverter;
index b42f467..1f4bac0 100644 (file)
@@ -91,7 +91,7 @@ define("COMPRESSION_SAVINGS", 0.20);
  * memcached client class implemented using (p)fsockopen()
  *
  * @author  Ryan T. Dean <rtdean@cytherianage.net>
- * @addtogroup cache
+ * @addtogroup Cache
  */
 class memcached
 {
index 6545694..cc6f073 100644 (file)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
-/**
- * Additional tests for UtfNormal::cleanUp() function, inclusion
- * regression checks for known problems.
- *
- * Requires PHPUnit.
- *
- * @addtogroup UtfNormal
- * @private
- */
 
 if( php_sapi_name() != 'cli' ) {
        die( "Run me from the command line please.\n" );
@@ -44,7 +35,12 @@ require_once 'PHPUnit/TextUI/TestRunner.php';
 require_once 'UtfNormal.php';
 
 /**
+ * Additional tests for UtfNormal::cleanUp() function, inclusion
+ * regression checks for known problems.
+ * Requires PHPUnit.
+ *
  * @addtogroup UtfNormal
+ * @private
  */
 class CleanUpTest extends PHPUnit_Framework_TestCase {
        /** @todo document */
index 278c3cc..43bbafd 100644 (file)
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
-/**
- * Unicode normalization routines for working with UTF-8 strings.
- * Currently assumes that input strings are valid UTF-8!
- *
- * Not as fast as I'd like, but should be usable for most purposes.
- * UtfNormal::toNFC() will bail early if given ASCII text or text
- * it can quickly deterimine is already normalized.
- *
- * All functions can be called static.
- *
- * See description of forms at http://www.unicode.org/reports/tr15/
- *
- * @addtogroup UtfNormal
- */
-
 /** */
 require_once dirname(__FILE__).'/UtfNormalUtil.php';
 
@@ -111,7 +96,18 @@ define( 'UNORM_FCD',  6 );
 define( 'NORMALIZE_ICU', function_exists( 'utf8_normalize' ) );
 
 /**
+ * Unicode normalization routines for working with UTF-8 strings.
+ * Currently assumes that input strings are valid UTF-8!
+ *
+ * Not as fast as I'd like, but should be usable for most purposes.
+ * UtfNormal::toNFC() will bail early if given ASCII text or text
+ * it can quickly deterimine is already normalized.
  *
+ * All functions can be called static.
+ *
+ * See description of forms at http://www.unicode.org/reports/tr15/
+ *
+ * @addtogroup UtfNormal
  */
 class UtfNormal {
        /**
@@ -123,7 +119,7 @@ class UtfNormal {
         *
         * @param string $string a UTF-8 string
         * @return string a clean, shiny, normalized UTF-8 string
-     * @static
+        * @static
         */
        static function cleanUp( $string ) {
                if( NORMALIZE_ICU ) {