http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89441

Revision: 89441
Author:   jeroendedauw
Date:     2011-06-03 20:39:02 +0000 (Fri, 03 Jun 2011)
Log Message:
-----------
added some docs

Modified Paths:
--------------
    trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php

Modified: 
trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php     
2011-06-03 20:38:22 UTC (rev 89440)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Description.php     
2011-06-03 20:39:02 UTC (rev 89441)
@@ -16,14 +16,16 @@
  */
 abstract class SMWDescription {
 
+       /**
+        * @var array of SMWPrintRequest
+        */
        protected $m_printreqs = array();
-       // add code for managing printouts, including iteration
 
        /**
         * Get the (possibly empty) array of all print requests that
         * exist for the entities that fit this description.
         *
-        * @return array
+        * @return array of SMWPrintRequest
         */
        public function getPrintRequests() {
                return $this->m_printreqs;
@@ -32,7 +34,7 @@
        /**
         * Set the array of print requests completely.
         *
-        * @param array $printrequests
+        * @param array of SMWPrintRequest $printrequests
         */
        public function setPrintRequests( array $printrequests ) {
                $this->m_printreqs = $printrequests;
@@ -68,6 +70,8 @@
         * over the canonical [[has location::\<q\>[[Paris]]\</q\>]].
         *
         * @param boolean $asvalue
+        * 
+        * @return string
         */
        abstract public function getQueryString( $asvalue = false );
 
@@ -193,8 +197,18 @@
  */
 class SMWClassDescription extends SMWDescription {
        
+       /**
+        * @var array of SMWDIWikiPage
+        */
        protected $m_diWikiPages;
 
+       /**
+        * Constructor.
+        * 
+        * @param mixed $content SMWDIWikiPage or array of SMWDIWikiPage
+        * 
+        * @throws Exception
+        */
        public function __construct( $content ) {
                if ( $content instanceof SMWDIWikiPage ) {
                        $this->m_diWikiPages = array( $content );
@@ -205,10 +219,16 @@
                }
        }
 
+       /**
+        * @param SMWClassDescription $description
+        */
        public function addDescription( SMWClassDescription $description ) {
                $this->m_diWikiPages = array_merge( $this->m_diWikiPages, 
$description->getCategories() );
        }
 
+       /**
+        * @return array of SMWDIWikiPage
+        */
        public function getCategories() {
                return $this->m_diWikiPages;
        }
@@ -285,12 +305,23 @@
  */
 class SMWConceptDescription extends SMWDescription {
        
+       /**
+        * @var SMWDIWikiPage
+        */
        protected $m_concept;
 
+       /**
+        * Constructor.
+        * 
+        * @param SMWDIWikiPage $concept
+        */
        public function __construct( SMWDIWikiPage $concept ) {
                $this->m_concept = $concept;
        }
 
+       /**
+        * @return SMWDIWikiPage
+        */
        public function getConcept() {
                return $this->m_concept;
        }
@@ -330,12 +361,23 @@
  */
 class SMWNamespaceDescription extends SMWDescription {
        
+       /**
+        * @var integer
+        */
        protected $m_namespace;
 
+       /**
+        * Constructor.
+        * 
+        * @param integer $namespace The namespace index
+        */
        public function __construct( $namespace ) {
                $this->m_namespace = $namespace;
        }
 
+       /**
+        * @return integer
+        */
        public function getNamespace() {
                return $this->m_namespace;
        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to