Improve documentation of content handler stuff
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 20 Dec 2012 19:44:47 +0000 (20:44 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Thu, 20 Dec 2012 19:44:47 +0000 (20:44 +0100)
- Split file and class documentation
- Add some missing file/class descriptions
- Add missing @ingroup Content

Change-Id: I7f7e3056570ca13a92f36a408c9b961c938f09a1

12 files changed:
includes/content/AbstractContent.php
includes/content/Content.php
includes/content/ContentHandler.php
includes/content/CssContent.php
includes/content/CssContentHandler.php
includes/content/JavaScriptContent.php
includes/content/JavaScriptContentHandler.php
includes/content/MessageContent.php
includes/content/TextContent.php
includes/content/TextContentHandler.php
includes/content/WikitextContent.php
includes/content/WikitextContentHandler.php

index 386f55a..cab65a5 100644 (file)
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Base implementation for content objects.
+ *
+ * @ingroup Content
+ */
 abstract class AbstractContent implements Content {
 
        /**
index 35b51c3..75ac5f2 100644 (file)
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Base interface for content objects.
+ *
+ * @ingroup Content
+ */
 interface Content {
 
        /**
index cff49df..2e90528 100644 (file)
@@ -1,7 +1,34 @@
 <?php
+/**
+ * Base class for content handling.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * 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
+ *
+ * @since 1.21
+ *
+ * @file
+ * @ingroup Content
+ *
+ * @author Daniel Kinzler
+ */
 
 /**
  * Exception representing a failure to serialize or unserialize a content object.
+ *
+ * @ingroup Content
  */
 class MWContentSerializationException extends MWException {
 
@@ -24,27 +51,7 @@ class MWContentSerializationException extends MWException {
  * type), but wikitext content may be represented by a DOM or AST structure in
  * the future.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * 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
- *
- * @since 1.21
- *
- * @file
  * @ingroup Content
- *
- * @author Daniel Kinzler
  */
 abstract class ContentHandler {
 
index 29527cf..3d4eb24 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Content object for CSS pages.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Content object for CSS pages.
+ *
+ * @ingroup Content
+ */
 class CssContent extends TextContent {
        public function __construct( $text ) {
                parent::__construct( $text, CONTENT_MODEL_CSS );
index 2c68d2f..cb5a349 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Content handler for CSS pages.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
+ * @ingroup Content
  */
 
 /**
+ * Content handler for CSS pages.
+ *
  * @since 1.21
+ * @ingroup Content
  */
 class CssContentHandler extends TextContentHandler {
 
index 770f233..7508079 100644 (file)
@@ -1,6 +1,7 @@
 <?php
-
 /**
+ * Content for JavaScript pages.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Content for JavaScript pages.
+ *
+ * @ingroup Content
+ */
 class JavaScriptContent extends TextContent {
        public function __construct( $text ) {
                parent::__construct( $text, CONTENT_MODEL_JAVASCRIPT );
@@ -57,4 +64,4 @@ class JavaScriptContent extends TextContent {
 
                return $html;
        }
-}
\ No newline at end of file
+}
index b5b4ee2..33fa917 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Content handler for JavaScript pages.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * @file
  */
 
-# XXX: make ScriptContentHandler base class, do highlighting stuff there?
-
 /**
+ * Content handler for JavaScript pages.
+ *
  * @since 1.21
+ * @ingroup Content
+ * @todo make ScriptContentHandler base class, do highlighting stuff there?
  */
 class JavaScriptContentHandler extends TextContentHandler {
 
index d38355d..b36b670 100644 (file)
@@ -1,9 +1,6 @@
 <?php
-
 /**
- * Wrapper allowing us to handle a system message as a Content object. Note that this is generally *not* used
- * to represent content from the MediaWiki namespace, and that there is no MessageContentHandler. MessageContent
- * is just intended as glue for wrapping a message programatically.
+ * Wrapper content object allowing to handle a system message as a Content object.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Wrapper allowing us to handle a system message as a Content object.
+ * Note that this is generally *not* used to represent content from the
+ * MediaWiki namespace, and that there is no MessageContentHandler.
+ * MessageContent is just intended as glue for wrapping a message programatically.
+ *
+ * @ingroup Content
+ */
 class MessageContent extends AbstractContent {
 
        /**
@@ -149,4 +155,4 @@ class MessageContent extends AbstractContent {
                $po = new ParserOutput( $html );
                return $po;
        }
-}
\ No newline at end of file
+}
index 872738b..0f7a531 100644 (file)
@@ -1,10 +1,7 @@
 <?php
-
 /**
  * Content object implementation for representing flat text.
  *
- * TextContent instances are immutable
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Content object implementation for representing flat text.
+ *
+ * TextContent instances are immutable
+ *
+ * @ingroup Content
+ */
 class TextContent extends AbstractContent {
 
        public function __construct( $text, $model_id = CONTENT_MODEL_TEXT ) {
index 90802f6..e7f41e1 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Base content handler class for flat text contents.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @since 1.21
+ *
  * @file
+ * @ingroup Content
  */
 
 /**
- * @since 1.21
+ * Base content handler implementation for flat text contents.
+ *
+ * @ingroup Content
  */
 class TextContentHandler extends ContentHandler {
 
index dabb855..8d778f5 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Content object for wiki text pages.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  *
  * @author Daniel Kinzler
  */
+
+/**
+ * Content object for wiki text pages.
+ *
+ * @ingroup Content
+ */
 class WikitextContent extends TextContent {
 
        public function __construct( $text ) {
index 4ec20ef..46412a9 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Content handler for wiki text pages.
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @since 1.21
+ *
  * @file
+ * @ingroup Content
  */
 
 /**
- * @since 1.21
+ * Content handler for wiki text pages.
+ *
+ * @ingroup Content
  */
 class WikitextContentHandler extends TextContentHandler {