-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #170 from JeroenDeDauw/suchclass
Use ::class to ref classes
- Loading branch information
Showing
13 changed files
with
54 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,17 @@ | |
* @author Jeroen De Dauw < [email protected] > | ||
*/ | ||
|
||
use DataValues\Geo\Parsers\GeoCoordinateParser; | ||
use Maps\CircleParser; | ||
use Maps\DistanceParser; | ||
use Maps\ImageOverlayParser; | ||
use Maps\LineParser; | ||
use Maps\LocationParser; | ||
use Maps\PolygonParser; | ||
use Maps\RectangleParser; | ||
use Maps\ServiceParam; | ||
use Maps\WmsOverlayParser; | ||
|
||
if ( !defined( 'MEDIAWIKI' ) ) { | ||
die( 'Not an entry point.' ); | ||
} | ||
|
@@ -189,42 +200,42 @@ | |
} | ||
|
||
$GLOBALS['wgParamDefinitions']['coordinate'] = [ | ||
'string-parser' => 'DataValues\Geo\Parsers\GeoCoordinateParser', | ||
'string-parser' => GeoCoordinateParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mappingservice'] = [ | ||
'definition'=> 'Maps\ServiceParam', | ||
'definition'=> ServiceParam::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mapslocation'] = [ | ||
'string-parser' => 'Maps\LocationParser', | ||
'string-parser' => LocationParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mapsline'] = [ | ||
'string-parser' => 'Maps\LineParser', | ||
'string-parser' => LineParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mapscircle'] = [ | ||
'string-parser' => 'Maps\CircleParser', | ||
'string-parser' => CircleParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mapsrectangle'] = [ | ||
'string-parser' => 'Maps\RectangleParser', | ||
'string-parser' => RectangleParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mapspolygon'] = [ | ||
'string-parser' => 'Maps\PolygonParser', | ||
'string-parser' => PolygonParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['distance'] = [ | ||
'string-parser' => 'Maps\DistanceParser', | ||
'string-parser' => DistanceParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['wmsoverlay'] = [ | ||
'string-parser' => 'Maps\WmsOverlayParser', | ||
'string-parser' => WmsOverlayParser::class, | ||
]; | ||
|
||
$GLOBALS['wgParamDefinitions']['mapsimageoverlay'] = [ | ||
'string-parser' => 'Maps\ImageOverlayParser', | ||
'string-parser' => ImageOverlayParser::class, | ||
]; | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
|
||
/** | ||
* This group contains all Google Maps v3 related files of the Maps extension. | ||
* | ||
* | ||
* @defgroup MapsGoogleMaps3 Google Maps v3 | ||
*/ | ||
|
||
/** | ||
* This file holds the hook and initialization for the Google Maps v3 service. | ||
* This file holds the hook and initialization for the Google Maps v3 service. | ||
* | ||
* @licence GNU GPL v2+ | ||
* @author Jeroen De Dauw < [email protected] > | ||
|
@@ -105,23 +105,23 @@ | |
} ); | ||
|
||
/** | ||
* Initialization function for the Google Maps v3 service. | ||
* | ||
* Initialization function for the Google Maps v3 service. | ||
* | ||
* @since 0.6.3 | ||
* @ingroup MapsGoogleMaps3 | ||
* | ||
* | ||
* @return boolean true | ||
*/ | ||
function efMapsInitGoogleMaps3() { | ||
global $wgAutoloadClasses; | ||
|
||
$wgAutoloadClasses['MapsGoogleMaps3'] = __DIR__ . '/Maps_GoogleMaps3.php'; | ||
|
||
MapsMappingServices::registerService( 'googlemaps3', 'MapsGoogleMaps3' ); | ||
MapsMappingServices::registerService( 'googlemaps3', MapsGoogleMaps3::class ); | ||
|
||
// TODO: kill below code | ||
$googleMaps = MapsMappingServices::getServiceInstance( 'googlemaps3' ); | ||
$googleMaps->addFeature( 'display_map', 'MapsDisplayMapRenderer' ); | ||
$googleMaps->addFeature( 'display_map', MapsDisplayMapRenderer::class ); | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
|
||
/** | ||
* This group contains all OpenLayers related files of the Maps extension. | ||
* | ||
* | ||
* @defgroup MapsOpenLayers OpenLayers | ||
*/ | ||
|
||
/** | ||
* This file holds the hook and initialization for the OpenLayers service. | ||
* This file holds the hook and initialization for the OpenLayers service. | ||
* | ||
* @licence GNU GPL v2+ | ||
* @author Jeroen De Dauw < [email protected] > | ||
|
@@ -53,11 +53,11 @@ | |
} ); | ||
|
||
function efMapsInitOpenLayers() { | ||
MapsMappingServices::registerService( | ||
MapsMappingServices::registerService( | ||
'openlayers', | ||
'MapsOpenLayers', | ||
[ 'display_map' => 'MapsDisplayMapRenderer' ] | ||
MapsOpenLayers::class, | ||
[ 'display_map' => MapsDisplayMapRenderer::class ] | ||
); | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters