r69120 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69119‎ | r69120 | r69121 >
Date:23:59, 6 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added docs
Modified paths:
  • /trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/GeoCoords/SM_GeoCoordsValue.php
@@ -20,6 +20,8 @@
2121 * @author Jeroen De Dauw
2222 * @author Markus Krötzsch
2323 *
 24+ * @since 0.6
 25+ *
2426 * @ingroup SemanticMaps
2527 */
2628 class SMGeoCoordsValue extends SMWDataValue {
@@ -30,7 +32,11 @@
3133 /**
3234 * Adds support for the geographical coordinate data type to Semantic MediaWiki.
3335 *
 36+ * @since 0.6
 37+ *
3438 * TODO: i18n keys still need to be moved
 39+ *
 40+ * @return true
3541 */
3642 public static function initGeoCoordsType() {
3743 SMWDataValueFactory::registerDatatype( '_geo', __CLASS__, 'Geographic coordinate' );
@@ -40,7 +46,11 @@
4147 /**
4248 * Defines the signature for geographical fields needed for the smw_coords table.
4349 *
 50+ * @since 0.6
 51+ *
4452 * @param array $fieldTypes The field types defined by SMW, passed by reference.
 53+ *
 54+ * @return true
4555 */
4656 public static function initGeoCoordsFieldTypes( array $fieldTypes ) {
4757 global $smgUseSpatialExtensions;
@@ -56,6 +66,8 @@
5767 /**
5868 * Defines the layout for the smw_coords table which is used to store value of the GeoCoords type.
5969 *
 70+ * @since 0.6
 71+ *
6072 * @param array $propertyTables The property tables defined by SMW, passed by reference.
6173 */
6274 public static function initGeoCoordsTable( array $propertyTables ) {
@@ -76,6 +88,8 @@
7789
7890 /**
7991 * @see SMWDataValue::parseUserValue
 92+ *
 93+ * @since 0.6
8094 */
8195 protected function parseUserValue( $value ) {
8296 $this->parseUserValueOrQuery( $value );
@@ -85,6 +99,8 @@
86100 * Overwrite SMWDataValue::getQueryDescription() to be able to process
87101 * comparators between all values.
88102 *
 103+ * @since 0.6
 104+ *
89105 * @param string $value
90106 *
91107 * @return SMWDescription
@@ -95,6 +111,11 @@
96112
97113 /**
98114 * Parses the value into the coordinates and any meta data provided, such as distance.
 115+ *
 116+ * @since 0.6
 117+ *
 118+ * @param $value String
 119+ * @param $asQuery Boolean
99120 */
100121 protected function parseUserValueOrQuery( $value, $asQuery = false ) {
101122 $this->mWikivalue = $value;
@@ -152,6 +173,8 @@
153174
154175 /**
155176 * @see SMWDataValue::parseDBkeys
 177+ *
 178+ * @since 0.6
156179 */
157180 protected function parseDBkeys( $args ) {
158181 global $smgUseSpatialExtensions, $smgQPCoodFormat, $smgQPCoodDirectional;
@@ -176,6 +199,8 @@
177200
178201 /**
179202 * @see SMWDataValue::getDBkeys
 203+ *
 204+ * @since 0.6
180205 */
181206 public function getDBkeys() {
182207 global $smgUseSpatialExtensions;
@@ -201,6 +226,8 @@
202227
203228 /**
204229 * @see SMWDataValue::getSignature
 230+ *
 231+ * @since 0.6
205232 */
206233 public function getSignature() {
207234 global $smgUseSpatialExtensions;
@@ -209,6 +236,8 @@
210237
211238 /**
212239 * @see SMWDataValue::getShortWikiText
 240+ *
 241+ * @since 0.6
213242 */
214243 public function getShortWikiText( $linked = null ) {
215244 if ( $this->isValid() && ( $linked !== null ) && ( $linked !== false ) ) {
@@ -228,6 +257,8 @@
229258
230259 /**
231260 * @see SMWDataValue::getShortHTMLText
 261+ *
 262+ * @since 0.6
232263 */
233264 public function getShortHTMLText( $linker = null ) {
234265 return $this->getShortWikiText( $linker );
@@ -235,6 +266,8 @@
236267
237268 /**
238269 * @see SMWDataValue::getLongWikiText
 270+ *
 271+ * @since 0.6
239272 */
240273 public function getLongWikiText( $linked = null ) {
241274 if ( !$this->isValid() ) {
@@ -248,6 +281,8 @@
249282
250283 /**
251284 * @see SMWDataValue::getLongHTMLText
 285+ *
 286+ * @since 0.6
252287 */
253288 public function getLongHTMLText( $linker = null ) {
254289 return $this->getLongWikiText( $linker );
@@ -255,6 +290,8 @@
256291
257292 /**
258293 * @see SMWDataValue::getWikiValue
 294+ *
 295+ * @since 0.6
259296 */
260297 public function getWikiValue() {
261298 $this->unstub();
@@ -263,6 +300,8 @@
264301
265302 /**
266303 * @see SMWDataValue::getExportData
 304+ *
 305+ * @since 0.6
267306 */
268307 public function getExportData() {
269308 if ( $this->isValid() ) {
@@ -287,6 +326,8 @@
288327 * $3: The latitude in non-directional float notation.
289328 * $4 The longitude in non-directional float notation.
290329 *
 330+ * @since 0.6.4
 331+ *
291332 * @return array
292333 */
293334 protected function getServiceLinkParams() {
@@ -299,6 +340,8 @@
300341 }
301342
302343 /**
 344+ * @since 0.6
 345+ *
303346 * @return array
304347 */
305348 public function getCoordinateSet() {
@@ -308,6 +351,8 @@
309352 /**
310353 * @see SMWDataValue::getValueIndex
311354 *
 355+ * @since 0.6
 356+ *
312357 * @return integer
313358 */
314359 public function getValueIndex() {
@@ -317,6 +362,8 @@
318363 /**
319364 * @see SMWDataValue::getLabelIndex
320365 *
 366+ * @since 0.6
 367+ *
321368 * @return integer
322369 */
323370 public function getLabelIndex() {
Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -61,6 +61,10 @@
6262 * 'Initialization' function for the Semantic Maps extension.
6363 * The only work done here is creating the extension credits for
6464 * Semantic Maps. The actuall work in done via the Maps hooks.
 65+ *
 66+ * @since 0.1
 67+ *
 68+ * @return true
6569 */
6670 function smfSetup() {
6771 global $wgExtensionCredits, $wgLang, $wgOut, $egMapsServices, $smgScriptPath;
@@ -94,6 +98,10 @@
9599
96100 /**
97101 * Adds a link to Admin Links page.
 102+ *
 103+ * @since 0.2
 104+ *
 105+ * @return true
98106 */
99107 function smfAddToAdminLinks( &$admin_links_tree ) {
100108 $displaying_data_section = $admin_links_tree->getSection( wfMsg( 'smw_adminlinks_displayingdata' ) );

Status & tagging log