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 GuzzleHttp\Client;
|
2021-09-21 01:13:15 +02:00
|
|
|
use Mpdf\Mpdf;
|
2021-10-02 03:52:07 +02:00
|
|
|
use RprtCli\Utils\Mailer\MailerInterface;
|
|
|
|
use RprtCli\Utils\Mailer\MailerService;
|
2021-09-21 01:13:15 +02:00
|
|
|
use RprtCli\Utils\PdfExport\PdfExportInterface;
|
|
|
|
use RprtCli\Utils\PdfExport\PdfExportService;
|
2021-09-20 01:08:42 +02:00
|
|
|
use RprtCli\Utils\TimeTrackingServices\YoutrackInterface;
|
|
|
|
use RprtCli\Utils\TimeTrackingServices\YoutrackService;
|
|
|
|
|
|
|
|
# use Symfony\Component\Translation\Translator;
|
|
|
|
#use Symfony\Component\Translation\Loader\PoFileLoader;
|
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/',
|
2021-09-20 01:08:42 +02:00
|
|
|
'default_locale' => 'en',
|
|
|
|
// 'translator' => ['default_path' => '%kernel.project_dir%/translations'],
|
|
|
|
// 'guzzle' => create()->constructor(Client::class),
|
|
|
|
'guzzle' => get(Client::class),
|
2021-09-21 01:13:15 +02:00
|
|
|
'mpdf' => get(Mpdf::class),
|
2021-04-05 17:20:59 +02:00
|
|
|
ConfigurationInterface::class => get(ConfigurationService::class),
|
|
|
|
ConfigurationService::class => create()->constructor(
|
|
|
|
get('config.path'),
|
2021-04-05 20:05:05 +02:00
|
|
|
get('config.file')
|
2021-04-05 17:20:59 +02:00
|
|
|
),
|
2021-04-05 20:05:05 +02:00
|
|
|
'config.service' => get(ConfigurationInterface::class),
|
2021-09-20 01:08:42 +02:00
|
|
|
YoutrackInterface::class => get(YoutrackService::class),
|
|
|
|
YoutrackService::class => create()->constructor(
|
|
|
|
get('config.service'),
|
|
|
|
get('guzzle')
|
|
|
|
),
|
|
|
|
'youtrack.service' => get(YoutrackInterface::class),
|
2021-09-21 01:13:15 +02:00
|
|
|
PdfExportInterface::class => get(PdfExportService::class),
|
|
|
|
PdfExportService::class => create()->constructor(
|
|
|
|
get('config.service'),
|
|
|
|
get('mpdf')
|
|
|
|
),
|
|
|
|
'pdf_export.service' => get(PdfExportInterface::class),
|
2021-09-20 01:08:42 +02:00
|
|
|
// 'locale' => get('config.service')->method('get', 'en'),
|
|
|
|
// Translator::class => create()->constructor('sl')->method('addLoader', 'po', new PoFileLoader),
|
|
|
|
// 'translator' => get(Translator::class),
|
2021-04-05 20:05:05 +02:00
|
|
|
CsvReportInterface::class => get(CsvReport::class),
|
|
|
|
CsvReport::class => create()->constructor(
|
|
|
|
get('config.service')
|
|
|
|
),
|
|
|
|
'csv.report' => get(CsvReportInterface::class),
|
2021-10-02 03:52:07 +02:00
|
|
|
MailerInterface::class => get(MailerService::class),
|
|
|
|
MailerService::class => create()->constructor(
|
|
|
|
get('config.service'),
|
|
|
|
get('pdf_export.service')
|
|
|
|
),
|
|
|
|
'mailer' => get(MailerInterface::class),
|
2021-04-05 20:05:05 +02:00
|
|
|
RprtCommand::class => create()->constructor(
|
|
|
|
get('csv.report'),
|
2021-09-20 01:08:42 +02:00
|
|
|
get('config.service'),
|
2021-09-21 01:13:15 +02:00
|
|
|
get('youtrack.service'),
|
2021-10-02 03:52:07 +02:00
|
|
|
get('pdf_export.service'),
|
|
|
|
get('mailer')
|
2021-09-20 01:08:42 +02:00
|
|
|
),
|
2021-10-02 03:52:07 +02:00
|
|
|
TrackCommand::class => create()->constructor(
|
|
|
|
get('config.service'),
|
|
|
|
get('youtrack.service')
|
|
|
|
)
|
2021-04-04 22:41:15 +02:00
|
|
|
];
|