1 | <?php |
||
10 | class MapsLeaflet extends MapsMappingService { |
||
11 | |||
12 | /** |
||
13 | * Constructor |
||
14 | */ |
||
15 | public function __construct( $serviceName ) { |
||
21 | |||
22 | /** |
||
23 | * @see MapsMappingService::addParameterInfo |
||
24 | * |
||
25 | * @since 3.0 |
||
26 | */ |
||
27 | public function addParameterInfo( array &$params ) { |
||
54 | |||
55 | /** |
||
56 | * @see iMappingService::getDefaultZoom |
||
57 | * |
||
58 | * @since 3.0 |
||
59 | */ |
||
60 | public function getDefaultZoom() { |
||
63 | |||
64 | /** |
||
65 | * @see MapsMappingService::getMapId |
||
66 | * |
||
67 | * @since 3.0 |
||
68 | */ |
||
69 | public function getMapId( $increment = true ) { |
||
78 | |||
79 | /** |
||
80 | * @see MapsMappingService::getResourceModules |
||
81 | * |
||
82 | * @since 3.0 |
||
83 | * |
||
84 | * @return array of string |
||
85 | */ |
||
86 | public function getResourceModules() { |
||
92 | |||
93 | protected function getDependencies() { |
||
100 | |||
101 | } |
||
102 |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: