2019-01-13 13:06:32 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
use SBRL\TomlConfig;
|
|
|
|
|
2019-01-15 15:46:24 +00:00
|
|
|
use AirQuality\Repositories\IDeviceRepository;
|
|
|
|
use AirQuality\Repositories\MariaDBDeviceRepository;
|
|
|
|
use AirQuality\Repositories\IMeasurementDataRepository;
|
|
|
|
use AirQuality\Repositories\MariaDBMeasurementDataRepository;
|
|
|
|
use AirQuality\Repositories\IMeasurementTypeRepository;
|
|
|
|
use AirQuality\Repositories\MariaDBMeasurementTypeRepository;
|
|
|
|
|
2019-01-13 13:06:32 +00:00
|
|
|
return [
|
|
|
|
"settings.file_default" => "data/settings.toml",
|
|
|
|
"settings.file_custom" => "settings.default.toml",
|
|
|
|
|
|
|
|
\SBRL\TomlConfig::class => function(ContainerInterface $c) {
|
|
|
|
return new TomlConfig(
|
|
|
|
$c->get("settings.file_default"),
|
|
|
|
$c->get("settings.file_custom")
|
|
|
|
);
|
|
|
|
},
|
|
|
|
|
2019-01-15 15:46:24 +00:00
|
|
|
IDeviceRepository::class => DI\autowire(MariaDBDeviceRepository::class),
|
|
|
|
IMeasurementDataRepository::class => DI\autowire(MariaDBMeasurementDataRepository::class),
|
|
|
|
IMeasurementTypeRepository::class => DI\autowire(MariaDBMeasurementTypeRepository::class),
|
|
|
|
|
|
|
|
|
2019-01-13 13:06:32 +00:00
|
|
|
\SBRL\SessionManager::class => DI\factory([ \SBRL\SessionManager::class, "get_instance" ])
|
|
|
|
];
|