2016-07-19 10:17:37 -05:00
|
|
|
<?php
|
2017-10-12 03:13:20 -05:00
|
|
|
declare(strict_types=1);
|
2017-07-22 06:33:32 -05:00
|
|
|
|
2016-08-01 14:11:42 -05:00
|
|
|
use Shlinkio\Shlink\CLI\Command;
|
|
|
|
use Shlinkio\Shlink\CLI\Factory\ApplicationFactory;
|
2017-07-22 06:33:32 -05:00
|
|
|
use Shlinkio\Shlink\Common\Service\IpLocationResolver;
|
|
|
|
use Shlinkio\Shlink\Common\Service\PreviewGenerator;
|
|
|
|
use Shlinkio\Shlink\Core\Service;
|
|
|
|
use Shlinkio\Shlink\Rest\Service\ApiKeyService;
|
2016-08-01 14:11:42 -05:00
|
|
|
use Symfony\Component\Console\Application;
|
2017-07-22 06:33:32 -05:00
|
|
|
use Zend\I18n\Translator\Translator;
|
|
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2016-07-19 10:17:37 -05:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
2016-07-31 09:30:05 -05:00
|
|
|
'dependencies' => [
|
2016-07-19 10:17:37 -05:00
|
|
|
'factories' => [
|
2016-08-01 14:11:42 -05:00
|
|
|
Application::class => ApplicationFactory::class,
|
2016-07-19 10:17:37 -05:00
|
|
|
|
2017-07-22 06:33:32 -05:00
|
|
|
Command\Shortcode\GenerateShortcodeCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Shortcode\ResolveUrlCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Shortcode\ListShortcodesCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Shortcode\GetVisitsCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Shortcode\GeneratePreviewCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Visit\ProcessVisitsCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Config\GenerateCharsetCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Config\GenerateSecretCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Api\GenerateKeyCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Api\DisableKeyCommand::class => ConfigAbstractFactory::class,
|
|
|
|
Command\Api\ListKeysCommand::class => ConfigAbstractFactory::class,
|
|
|
|
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 => [
|
|
|
|
Command\Shortcode\GenerateShortcodeCommand::class => [
|
|
|
|
Service\UrlShortener::class,
|
|
|
|
'translator',
|
|
|
|
'config.url_shortener.domain',
|
|
|
|
],
|
|
|
|
Command\Shortcode\ResolveUrlCommand::class => [Service\UrlShortener::class, 'translator'],
|
|
|
|
Command\Shortcode\ListShortcodesCommand::class => [Service\ShortUrlService::class, 'translator'],
|
|
|
|
Command\Shortcode\GetVisitsCommand::class => [Service\VisitsTracker::class, 'translator'],
|
|
|
|
Command\Shortcode\GeneratePreviewCommand::class => [
|
|
|
|
Service\ShortUrlService::class,
|
|
|
|
PreviewGenerator::class,
|
2017-10-12 03:13:20 -05:00
|
|
|
'translator',
|
2017-07-22 06:33:32 -05:00
|
|
|
],
|
|
|
|
Command\Visit\ProcessVisitsCommand::class => [
|
|
|
|
Service\VisitService::class,
|
|
|
|
IpLocationResolver::class,
|
2017-10-12 03:13:20 -05:00
|
|
|
'translator',
|
2016-07-19 10:17:37 -05:00
|
|
|
],
|
2017-07-22 06:33:32 -05:00
|
|
|
Command\Config\GenerateCharsetCommand::class => ['translator'],
|
|
|
|
Command\Config\GenerateSecretCommand::class => ['translator'],
|
|
|
|
Command\Api\GenerateKeyCommand::class => [ApiKeyService::class, 'translator'],
|
|
|
|
Command\Api\DisableKeyCommand::class => [ApiKeyService::class, 'translator'],
|
|
|
|
Command\Api\ListKeysCommand::class => [ApiKeyService::class, 'translator'],
|
|
|
|
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 10:17:37 -05:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|