2016-07-19 18:17:37 +03:00
|
|
|
<?php
|
2017-10-12 11:13:20 +03:00
|
|
|
declare(strict_types=1);
|
2017-07-22 14:33:32 +03:00
|
|
|
|
2016-08-01 22:11:42 +03:00
|
|
|
use Shlinkio\Shlink\CLI\Command;
|
|
|
|
use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
|
2018-07-31 21:24:13 +03:00
|
|
|
use Shlinkio\Shlink\Common\Service\IpApiLocationResolver;
|
2017-07-22 14:33:32 +03:00
|
|
|
use Shlinkio\Shlink\Common\Service\PreviewGenerator;
|
|
|
|
use Shlinkio\Shlink\Core\Service;
|
|
|
|
use Shlinkio\Shlink\Rest\Service\ApiKeyService;
|
2016-08-01 22:11:42 +03:00
|
|
|
use Symfony\Component\Console\Application;
|
2017-07-22 14:33:32 +03:00
|
|
|
use Zend\I18n\Translator\Translator;
|
|
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2016-07-19 18:17:37 +03:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
2016-07-31 17:30:05 +03:00
|
|
|
'dependencies' => [
|
2016-07-19 18:17:37 +03:00
|
|
|
'factories' => [
|
2016-08-01 22:11:42 +03:00
|
|
|
Application::class => ApplicationFactory::class,
|
2016-07-19 18:17:37 +03:00
|
|
|
|
2018-09-16 19:36:02 +03:00
|
|
|
Command\ShortUrl\GenerateShortUrlCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\ShortUrl\ResolveUrlCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\ShortUrl\ListShortUrlsCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\ShortUrl\GetVisitsCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\ShortUrl\GeneratePreviewCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\ShortUrl\DeleteShortUrlCommand::class => ConfigAbstractFactory::class,
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Visit\ProcessVisitsCommand::class => ConfigAbstractFactory::class,
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Config\GenerateCharsetCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Config\GenerateSecretCommand::class => ConfigAbstractFactory::class,
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Api\GenerateKeyCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Api\DisableKeyCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Api\ListKeysCommand::class => ConfigAbstractFactory::class,
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Tag\ListTagsCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Tag\CreateTagCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Tag\RenameTagCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Tag\DeleteTagsCommand::class => ConfigAbstractFactory::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
ConfigAbstractFactory::class => [
|
2018-09-16 19:36:02 +03:00
|
|
|
Command\ShortUrl\GenerateShortUrlCommand::class => [
|
2017-07-22 14:33:32 +03:00
|
|
|
Service\UrlShortener::class,
|
|
|
|
'translator',
|
|
|
|
'config.url_shortener.domain',
|
|
|
|
],
|
2018-09-16 19:36:02 +03:00
|
|
|
Command\ShortUrl\ResolveUrlCommand::class => [Service\UrlShortener::class, 'translator'],
|
|
|
|
Command\ShortUrl\ListShortUrlsCommand::class => [
|
2018-08-11 00:14:45 +03:00
|
|
|
Service\ShortUrlService::class,
|
|
|
|
'translator',
|
|
|
|
'config.url_shortener.domain',
|
|
|
|
],
|
2018-09-16 19:36:02 +03:00
|
|
|
Command\ShortUrl\GetVisitsCommand::class => [Service\VisitsTracker::class, 'translator'],
|
|
|
|
Command\ShortUrl\GeneratePreviewCommand::class => [
|
2017-07-22 14:33:32 +03:00
|
|
|
Service\ShortUrlService::class,
|
|
|
|
PreviewGenerator::class,
|
2017-10-12 11:13:20 +03:00
|
|
|
'translator',
|
2017-07-22 14:33:32 +03:00
|
|
|
],
|
2018-09-16 19:36:02 +03:00
|
|
|
Command\ShortUrl\DeleteShortUrlCommand::class => [
|
2018-09-15 18:57:12 +03:00
|
|
|
Service\ShortUrl\DeleteShortUrlService::class,
|
|
|
|
'translator',
|
|
|
|
],
|
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Visit\ProcessVisitsCommand::class => [
|
|
|
|
Service\VisitService::class,
|
2018-07-31 21:24:13 +03:00
|
|
|
IpApiLocationResolver::class,
|
2017-10-12 11:13:20 +03:00
|
|
|
'translator',
|
2016-07-19 18:17:37 +03:00
|
|
|
],
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Config\GenerateCharsetCommand::class => ['translator'],
|
|
|
|
Command\Config\GenerateSecretCommand::class => ['translator'],
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Api\GenerateKeyCommand::class => [ApiKeyService::class, 'translator'],
|
|
|
|
Command\Api\DisableKeyCommand::class => [ApiKeyService::class, 'translator'],
|
|
|
|
Command\Api\ListKeysCommand::class => [ApiKeyService::class, 'translator'],
|
2018-09-15 18:57:12 +03:00
|
|
|
|
2017-07-22 14:33:32 +03:00
|
|
|
Command\Tag\ListTagsCommand::class => [Service\Tag\TagService::class, Translator::class],
|
|
|
|
Command\Tag\CreateTagCommand::class => [Service\Tag\TagService::class, Translator::class],
|
|
|
|
Command\Tag\RenameTagCommand::class => [Service\Tag\TagService::class, Translator::class],
|
|
|
|
Command\Tag\DeleteTagsCommand::class => [Service\Tag\TagService::class, Translator::class],
|
2016-07-19 18:17:37 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|