Deprecate ServiceContainerTrait::getService.

This commit is contained in:
David Molineus
2015-09-14 07:23:42 +02:00
parent 8a148ffaf8
commit 5171825a23
4 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ class Control
*/ */
public function __construct() public function __construct()
{ {
$this->database = static::getService('database.connection'); $this->database = static::getServiceContainer()->getDatabaseConnection();
} }
/** /**

View File

@@ -46,7 +46,7 @@ class Layer
public function __construct() public function __construct()
{ {
$this->layers = &$GLOBALS['LEAFLET_LAYERS']; $this->layers = &$GLOBALS['LEAFLET_LAYERS'];
$this->database = static::getService('database.connection'); $this->database = static::getServiceContainer()->getDatabaseConnection();
\Controller::loadLanguageFile('leaflet_layer'); \Controller::loadLanguageFile('leaflet_layer');

View File

@@ -34,7 +34,7 @@ class Map
*/ */
public function __construct() public function __construct()
{ {
$this->database = static::getService('database.connection'); $this->database = static::getServiceContainer()->getDatabaseConnection();
} }
/** /**

View File

@@ -60,7 +60,7 @@ class Hooks
*/ */
protected function getMapService() 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); return $mapService->generate($mapId, null, $mapId, $template, $style);
} catch (\Exception $e) { } catch (\Exception $e) {
if (static::getService('config')->get('debugMode')) { if (static::getServiceContainer()->getConfig()->get('debugMode')) {
throw $e; throw $e;
} }