diff --git a/src/Netzmacht/Contao/Leaflet/Dca/Control.php b/src/Netzmacht/Contao/Leaflet/Dca/Control.php index 5cf37f7..28da0b3 100644 --- a/src/Netzmacht/Contao/Leaflet/Dca/Control.php +++ b/src/Netzmacht/Contao/Leaflet/Dca/Control.php @@ -37,7 +37,7 @@ class Control */ public function __construct() { - $this->database = static::getService('database.connection'); + $this->database = static::getServiceContainer()->getDatabaseConnection(); } /** diff --git a/src/Netzmacht/Contao/Leaflet/Dca/Layer.php b/src/Netzmacht/Contao/Leaflet/Dca/Layer.php index d5afa99..0ce8782 100644 --- a/src/Netzmacht/Contao/Leaflet/Dca/Layer.php +++ b/src/Netzmacht/Contao/Leaflet/Dca/Layer.php @@ -46,7 +46,7 @@ class Layer public function __construct() { $this->layers = &$GLOBALS['LEAFLET_LAYERS']; - $this->database = static::getService('database.connection'); + $this->database = static::getServiceContainer()->getDatabaseConnection(); \Controller::loadLanguageFile('leaflet_layer'); diff --git a/src/Netzmacht/Contao/Leaflet/Dca/Map.php b/src/Netzmacht/Contao/Leaflet/Dca/Map.php index 20788a2..83ab048 100644 --- a/src/Netzmacht/Contao/Leaflet/Dca/Map.php +++ b/src/Netzmacht/Contao/Leaflet/Dca/Map.php @@ -34,7 +34,7 @@ class Map */ public function __construct() { - $this->database = static::getService('database.connection'); + $this->database = static::getServiceContainer()->getDatabaseConnection(); } /** diff --git a/src/Netzmacht/Contao/Leaflet/Frontend/Hooks.php b/src/Netzmacht/Contao/Leaflet/Frontend/Hooks.php index 1f29c49..2518e99 100644 --- a/src/Netzmacht/Contao/Leaflet/Frontend/Hooks.php +++ b/src/Netzmacht/Contao/Leaflet/Frontend/Hooks.php @@ -60,7 +60,7 @@ class Hooks */ protected function getMapService() { - return static::getService('leaflet.map.service'); + return static::getServiceContainer()->getService('leaflet.map.service'); } /** @@ -81,7 +81,7 @@ class Hooks return $mapService->generate($mapId, null, $mapId, $template, $style); } catch (\Exception $e) { - if (static::getService('config')->get('debugMode')) { + if (static::getServiceContainer()->getConfig()->get('debugMode')) { throw $e; }