2021-04-04 22:41:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use function DI\create;
|
|
|
|
use function DI\get;
|
|
|
|
|
|
|
|
use RprtCli\Commands\RprtCommand;
|
2021-04-05 17:20:59 +02:00
|
|
|
use RprtCli\Utils\Configuration\ConfigurationInterface;
|
|
|
|
use RprtCli\Utils\Configuration\ConfigurationService;
|
2021-04-05 16:23:06 +02:00
|
|
|
use RprtCli\Utils\CsvReport\CsvReport;
|
|
|
|
use RprtCli\Utils\CsvReport\CsvReportInterface;
|
2021-04-05 17:20:59 +02:00
|
|
|
use Symfony\Component\Yaml\Yaml;
|
|
|
|
use GuzzleHttp\Client;
|
2021-04-04 22:41:15 +02:00
|
|
|
|
|
|
|
return [
|
2021-04-05 17:20:59 +02:00
|
|
|
'config.file' => 'rprt.config.yml',
|
|
|
|
'config.path' => '~/.config/rprt-cli/',
|
|
|
|
'guzzle' => create()->constructor(\GuzzleHttp\Client::class),
|
|
|
|
'yaml' => create()->constructor(\Symfony\Component\Yaml\Yaml::class),
|
2021-04-05 16:23:06 +02:00
|
|
|
\GuzzleHttp\ClientInterface::class => DI\get(\GuzzleHttp\Client::class),
|
|
|
|
CsvReportInterface::class => DI\get(CsvReport::class),
|
2021-04-05 17:20:59 +02:00
|
|
|
ConfigurationInterface::class => get(ConfigurationService::class),
|
|
|
|
ConfigurationService::class => create()->constructor(
|
|
|
|
get('config.path'),
|
|
|
|
get('config.file'),
|
|
|
|
get('yaml')
|
|
|
|
),
|
2021-04-05 16:23:06 +02:00
|
|
|
RprtCommand::class => DI\create()->constructor(
|
2021-04-05 17:20:59 +02:00
|
|
|
get(CsvReportInterface::class),
|
|
|
|
get(ConfigurationInterface::class)
|
2021-04-04 22:41:15 +02:00
|
|
|
)
|
|
|
|
];
|