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

Revision: 69121
Author:   jeroendedauw
Date:     2010-07-07 00:06:21 +0000 (Wed, 07 Jul 2010)

Log Message:
-----------
Added docs

Modified Paths:
--------------
    trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
    trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValueDescription.php

Modified: trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php
===================================================================
--- trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php 
2010-07-06 23:59:36 UTC (rev 69120)
+++ trunk/extensions/SemanticMaps/GeoCoords/SM_AreaValueDescription.php 
2010-07-07 00:06:21 UTC (rev 69121)
@@ -22,11 +22,22 @@
  * 
  * TODO: would be awesome to use Spatial Extensions to select coordinates
  * 
+ * @since 0.6
+ * 
  * @ingroup SemanticMaps
  */
 class SMAreaValueDescription extends SMWValueDescription {
        protected $mBounds = false;
 
+       /**
+        * Constructor.
+        * 
+        * @since 0.6
+        * 
+        * @param SMGeoCoordsValue $dataValue
+        * @param string $comparator
+        * @param string $radius
+        */
        public function __construct( SMGeoCoordsValue $dataValue, $comparator, 
$radius ) {
                parent::__construct( $dataValue, $comparator ); 
 
@@ -39,6 +50,8 @@
        /**
         * Sets the mBounds fields to an array returned by 
SMAreaValueDescription::getBoundingBox.
         * 
+        * @since 0.6
+        * 
         * @param SMGeoCoordsValue $dataValue
         * @param string $radius
         */
@@ -52,6 +65,8 @@
        /**
         * @see SMWDescription:getQueryString
         * 
+        * @since 0.6
+        * 
         * @param Boolean $asvalue
         */
        public function getQueryString( $asValue = false ) {
@@ -65,12 +80,16 @@
 
        /**
         * @see SMWDescription:prune
+        * 
+        * @since 0.6
         */
     public function prune( &$maxsize, &$maxdepth, &$log ) {
        if ( ( $maxsize < $this->getSize() ) || ( $maxdepth < $this->getDepth() 
) ) {
                        $log[] = $this->getQueryString();
+                       
                        $result = new SMWThingDescription();
                        $result->setPrintRequests( $this->getPrintRequests() );
+                       
                        return $result;
                } else {
                        $maxsize = $maxsize - $this->getSize();
@@ -81,6 +100,10 @@
     
     /**
      * Returns the bounds of the area.
+     * 
+     * @since 0.6
+     * 
+     * @return array
      */
     public function getBounds() {
        return $this->mBounds;
@@ -89,11 +112,13 @@
        /**
         * @see SMWDescription::getSQLCondition
         * 
+        * @since 0.6
+        * 
         * @param string $tableName
         * @param array $fieldNames
         * @param DatabaseBase or Database $dbs
         * 
-        * @return true
+        * @return string or false
         */
        public function getSQLCondition( $tableName, array $fieldNames, $dbs ) {
                global $smgUseSpatialExtensions;
@@ -140,6 +165,8 @@
        /**
         * Returns the lat and lon limits of a bounding box around a circle 
defined by the provided parameters.
         * 
+        * @since 0.6
+        * 
         * @param array $centerCoordinates Array containing non-directional 
float coordinates with lat and lon keys. 
         * @param float $circleRadius The radidus of the circle to create a 
bounding box for, in m.
         * 
@@ -161,8 +188,13 @@
        
        /**
         * Returns a boolean indicating if MapsGeoFunctions is available. 
+        * 
+        * @since 0.6
+        * 
+        * @return boolean
         */
        protected static function geoFunctionsAreAvailable() {
                return class_exists( 'MapsGeoFunctions' );
        }       
+       
 }
\ No newline at end of file

Modified: 
trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValueDescription.php
===================================================================
--- trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValueDescription.php    
2010-07-06 23:59:36 UTC (rev 69120)
+++ trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValueDescription.php    
2010-07-07 00:06:21 UTC (rev 69121)
@@ -18,11 +18,17 @@
  *
  * @author Jeroen De Dauw
  * 
+ * @since 0.6
+ * 
  * @ingroup SemanticMaps
  */
 class SMGeoCoordsValueDescription extends SMWValueDescription {
        
        /**
+        * Constructor.
+        * 
+        * @since 0.6
+        * 
         * @param SMGeoCoordsValue $dataValue
         */
        public function __construct( SMGeoCoordsValue $dataValue, $comparator ) 
{
@@ -32,6 +38,8 @@
        /**
         * @see SMWDescription::getQueryString
         * 
+        * @since 0.6
+        * 
         * @param Boolean $asvalue
         */
        public function getQueryString( $asValue = false ) {
@@ -46,6 +54,8 @@
        /**
         * @see SMWDescription::getSQLCondition
         * 
+        * @since 0.6
+        * 
         * @param string $tableName
         * @param array $fieldNames
         * @param DatabaseBase or Database $dbs



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to