Index: trunk/extensions/SemanticMaps/includes/SM_GeoCoordsValue.php |
— | — | @@ -72,6 +72,8 @@ |
73 | 73 | * |
74 | 74 | * @param $value String |
75 | 75 | * @param $asQuery Boolean |
| 76 | + * |
| 77 | + * @return SMWDescription |
76 | 78 | */ |
77 | 79 | protected function parseUserValueOrQuery( $value, $asQuery = false ) { |
78 | 80 | $this->wikiValue = $value; |
Index: trunk/extensions/SemanticMaps/includes/forminputs/SM_FormInputs.php |
— | — | @@ -6,7 +6,8 @@ |
7 | 7 | * @file SM_FormInputs.php |
8 | 8 | * @ingroup SemanticMaps |
9 | 9 | * |
10 | | - * @author Jeroen De Dauw |
| 10 | + * @licence GNU GPL v3 |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
11 | 12 | */ |
12 | 13 | |
13 | 14 | if ( !defined( 'MEDIAWIKI' ) ) { |
— | — | @@ -77,7 +78,7 @@ |
78 | 79 | * Adds a mapping service's form hook. |
79 | 80 | * |
80 | 81 | * @param string $inputName The name of the form input. |
81 | | - * @param strig $mainName |
| 82 | + * @param string $mainName |
82 | 83 | */ |
83 | 84 | private static function initFormHook( $inputName, $mainName = '' ) { |
84 | 85 | global $sfgFormPrinter; |
Index: trunk/extensions/SemanticMaps/includes/SM_GeoCoordsValueDescription.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | |
4 | 4 | /** |
5 | | - * Description of one data value of type Goegraphical Coordinates. |
| 5 | + * Description of one data value of type Geographical Coordinates. |
6 | 6 | * |
7 | 7 | * @since 0.6 |
8 | 8 | * @file SM_GeoCoordsValueDescription.php |
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryPrinters.php |
— | — | @@ -6,7 +6,8 @@ |
7 | 7 | * @file SM_QueryPrinters.php |
8 | 8 | * @ingroup SemanticMaps |
9 | 9 | * |
10 | | - * @author Jeroen De Dauw |
| 10 | + * @licence GNU GPL v3 |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
11 | 12 | */ |
12 | 13 | |
13 | 14 | if ( !defined( 'MEDIAWIKI' ) ) { |
— | — | @@ -88,13 +89,7 @@ |
89 | 90 | */ |
90 | 91 | private static function addFormatQP( $format, $class ) { |
91 | 92 | global $smwgResultFormats; |
92 | | - |
93 | | - if ( isset( $smwgResultFormats ) ) { |
94 | | - $smwgResultFormats[$format] = $class; |
95 | | - } |
96 | | - else { // BC with some old SMW version |
97 | | - SMWQueryProcessor::$formats[$format] = $class; |
98 | | - } |
| 93 | + $smwgResultFormats[$format] = $class; |
99 | 94 | } |
100 | 95 | |
101 | 96 | } |
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Query printer for maps. Is invoked via SMMapper. |
6 | | - * Can be overriden per service to have custom output. |
| 6 | + * Can be overridden per service to have custom output. |
7 | 7 | * |
8 | 8 | * @file SM_MapPrinter.php |
9 | 9 | * @ingroup SemanticMaps |
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @ingroup SemanticMaps |
10 | 10 | * @file SM_QueryHandler.php |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | class SMQueryHandler { |
15 | 16 | |
— | — | @@ -81,7 +82,7 @@ |
82 | 83 | protected $pageLinkText; |
83 | 84 | |
84 | 85 | /** |
85 | | - * A separator to use beteen the subject and properties in the text field. |
| 86 | + * A separator to use between the subject and properties in the text field. |
86 | 87 | * |
87 | 88 | * @since 1.0 |
88 | 89 | * |
— | — | @@ -114,6 +115,9 @@ |
115 | 116 | * |
116 | 117 | * @param SMWQueryResult $queryResult |
117 | 118 | * @param integer $outputmode |
| 119 | + * @param boolean $linkAbsolute |
| 120 | + * @param string $pageLinkText |
| 121 | + * @param boolean $titleLinkSeparate |
118 | 122 | */ |
119 | 123 | public function __construct( SMWQueryResult $queryResult, $outputmode, $linkAbsolute = false, $pageLinkText = '$1', $titleLinkSeparate = false ) { |
120 | 124 | $this->queryResult = $queryResult; |
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_Mapper.php |
— | — | @@ -61,22 +61,26 @@ |
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
65 | | - * Explcitly define this method, so method_exists returns true in SMW. |
| 65 | + * Explicitly define this method, so method_exists returns true in SMW. |
66 | 66 | * |
67 | 67 | * @see SMWResultPrinter::getParameters |
68 | 68 | * |
69 | 69 | * @since 1.0 |
| 70 | + * |
| 71 | + * @return array |
70 | 72 | */ |
71 | 73 | public function getParameters() { |
72 | 74 | return $this->queryPrinter->getParameters(); |
73 | 75 | } |
74 | 76 | |
75 | 77 | /** |
76 | | - * Explcitly define this method, so method_exists returns true in SMW. |
| 78 | + * Explicitly define this method, so method_exists returns true in SMW. |
77 | 79 | * |
78 | 80 | * @see SMWResultPrinter::getParameters |
79 | 81 | * |
80 | 82 | * @since 1.0 |
| 83 | + * |
| 84 | + * @return array |
81 | 85 | */ |
82 | 86 | public function getValidatorParameters() { |
83 | 87 | return $this->queryPrinter->getValidatorParameters(); |
— | — | @@ -84,12 +88,14 @@ |
85 | 89 | |
86 | 90 | /** |
87 | 91 | * SMW thinks this class is a SMWResultPrinter, and calls methods that should |
88 | | - * be forewarded to $this->queryPrinter on it. |
| 92 | + * be forward to $this->queryPrinter on it. |
89 | 93 | * |
90 | 94 | * @since 1.0 |
91 | 95 | * |
92 | 96 | * @param string $name |
93 | 97 | * @param array $arguments |
| 98 | + * |
| 99 | + * @return mixed|void |
94 | 100 | */ |
95 | 101 | public function __call( $name, array $arguments ) { |
96 | 102 | return call_user_func_array( array( $this->queryPrinter, $name ), $arguments ); |
Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_KMLPrinter.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | * @file SM_KMLPrinter.php |
10 | 10 | * @ingroup SemanticMaps |
11 | 11 | * |
12 | | - * @author Jeroen De Dauw |
| 12 | + * @licence GNU GPL v3 |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | class SMKMLPrinter extends SMWResultPrinter { |
15 | 16 | /** |
— | — | @@ -91,12 +92,12 @@ |
92 | 93 | * @return string |
93 | 94 | */ |
94 | 95 | protected function getKML( SMWQueryResult $res, $outputmode ) { |
95 | | - $queryHandler = new SMQueryHandler( $res, $outputmode, $this->m_params['linkabsolute'], $this->m_params['pagelinktext'], false ); |
96 | | - $queryHandler->setText( $this->m_params['text'] ); |
97 | | - $queryHandler->setTitle( $this->m_params['title'] ); |
| 96 | + $queryHandler = new SMQueryHandler( $res, $outputmode, $this->params['linkabsolute'], $this->params['pagelinktext'], false ); |
| 97 | + $queryHandler->setText( $this->params['text'] ); |
| 98 | + $queryHandler->setTitle( $this->params['title'] ); |
98 | 99 | $queryHandler->setSubjectSeparator( '' ); |
99 | 100 | |
100 | | - $formatter = new MapsKMLFormatter( $this->m_params ); |
| 101 | + $formatter = new MapsKMLFormatter( $this->params ); |
101 | 102 | $formatter->addPlacemarks( $queryHandler->getLocations() ); |
102 | 103 | |
103 | 104 | return $formatter->getKML(); |
— | — | @@ -116,19 +117,19 @@ |
117 | 118 | $searchLabel = $this->getSearchLabel( $outputmode ); |
118 | 119 | $link = $res->getQueryLink( $searchLabel ? $searchLabel : wfMsgForContent( 'semanticmaps-kml-link' ) ); |
119 | 120 | $link->setParameter( 'kml', 'format' ); |
120 | | - $link->setParameter( $this->m_params['linkabsolute'] ? 'yes' : 'no', 'linkabsolute' ); |
121 | | - $link->setParameter( $this->m_params['pagelinktext'], 'pagelinktext' ); |
| 121 | + $link->setParameter( $this->params['linkabsolute'] ? 'yes' : 'no', 'linkabsolute' ); |
| 122 | + $link->setParameter( $this->params['pagelinktext'], 'pagelinktext' ); |
122 | 123 | |
123 | | - if ( $this->m_params['title'] !== '' ) { |
124 | | - $link->setParameter( $this->m_params['title'], 'title' ); |
| 124 | + if ( $this->params['title'] !== '' ) { |
| 125 | + $link->setParameter( $this->params['title'], 'title' ); |
125 | 126 | } |
126 | 127 | |
127 | | - if ( $this->m_params['text'] !== '' ) { |
128 | | - $link->setParameter( $this->m_params['text'], 'text' ); |
| 128 | + if ( $this->params['text'] !== '' ) { |
| 129 | + $link->setParameter( $this->params['text'], 'text' ); |
129 | 130 | } |
130 | 131 | |
131 | | - if ( array_key_exists( 'limit', $this->m_params ) ) { |
132 | | - $link->setParameter( $this->m_params['limit'], 'limit' ); |
| 132 | + if ( array_key_exists( 'limit', $this->params ) ) { |
| 133 | + $link->setParameter( $this->params['limit'], 'limit' ); |
133 | 134 | } else { // Use a reasonable default limit. |
134 | 135 | $link->setParameter( 20, 'limit' ); |
135 | 136 | } |
Index: trunk/extensions/SemanticMaps/includes/SM_AreaValueDescription.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Description of a geographical area defined by a coordinates set and a distance to the bounds. |
6 | | - * The bounds are a 'rectangle' (but bend due to the earhs curvature), as the resulting query |
| 6 | + * The bounds are a 'rectangle' (but bend due to the earths curvature), as the resulting query |
7 | 7 | * would otherwise be to resource intensive. |
8 | 8 | * |
9 | 9 | * @since 0.6 |
— | — | @@ -10,7 +10,8 @@ |
11 | 11 | * @file SM_AreaValueDescription.php |
12 | 12 | * @ingroup SemanticMaps |
13 | 13 | * |
14 | | - * @author Jeroen De Dauw |
| 14 | + * @licence GNU GPL v3 |
| 15 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com |
15 | 16 | * |
16 | 17 | * TODO: would be awesome to use Spatial Extensions to select coordinates |
17 | 18 | */ |
— | — | @@ -63,10 +64,11 @@ |
64 | 65 | * |
65 | 66 | * @since 0.6 |
66 | 67 | * |
67 | | - * @param Boolean $asvalue |
| 68 | + * @param Boolean $asValue |
68 | 69 | */ |
69 | 70 | public function getQueryString( $asValue = false ) { |
70 | 71 | if ( $this->getDataItem() !== null ) { |
| 72 | + // FIXME |
71 | 73 | $queryString = SMWDataValueFactory::newDataItemValue( $this->getDataItem() )->getWikiValue(); |
72 | 74 | return $asValue ? $queryString : "[[$queryString]]"; |
73 | 75 | } else { |
— | — | @@ -154,7 +156,7 @@ |
155 | 157 | * @since 0.6 |
156 | 158 | * |
157 | 159 | * @param array $centerCoordinates Array containing non-directional float coordinates with lat and lon keys. |
158 | | - * @param float $circleRadius The radidus of the circle to create a bounding box for, in m. |
| 160 | + * @param float $circleRadius The radius of the circle to create a bounding box for, in m. |
159 | 161 | * |
160 | 162 | * @return An associative array containing the limits with keys north, east, south and west. |
161 | 163 | */ |
Index: trunk/extensions/SemanticMaps/SemanticMaps.i18n.php |
— | — | @@ -6,7 +6,8 @@ |
7 | 7 | * @file SemanticMaps.i18n.php |
8 | 8 | * @ingroup Semantic Maps |
9 | 9 | * |
10 | | - * @author Jeroen De Dauw |
| 10 | + * @licence GNU GPL v3 |
| 11 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com |
11 | 12 | */ |
12 | 13 | |
13 | 14 | $messages = array(); |
Index: trunk/extensions/SemanticMaps/SemanticMaps.hooks.php |
— | — | @@ -7,8 +7,9 @@ |
8 | 8 | * |
9 | 9 | * @file SemanticMaps.hooks.php |
10 | 10 | * @ingroup SemanticMaps |
11 | | - * |
12 | | - * @author Jeroen De Dauw |
| 11 | + * |
| 12 | + * @licence GNU GPL v3 |
| 13 | + * @author Jeroen De Dauw < jeroendedauw@gmail.com > |
13 | 14 | */ |
14 | 15 | final class SemanticMapsHooks { |
15 | 16 | |
— | — | @@ -16,7 +17,9 @@ |
17 | 18 | * Adds a link to Admin Links page. |
18 | 19 | * |
19 | 20 | * @since 0.7 |
20 | | - * |
| 21 | + * |
| 22 | + * @param array $admin_links_tree |
| 23 | + * |
21 | 24 | * @return true |
22 | 25 | */ |
23 | 26 | public static function addToAdminLinks( &$admin_links_tree ) { |