shlink/module/Rest/config/dependencies.config.php

96 lines
4.2 KiB
PHP
Raw Normal View History

2016-07-19 10:07:59 -05:00
<?php
2017-10-12 03:13:20 -05:00
declare(strict_types=1);
namespace Shlinkio\Shlink\Rest;
use Psr\Log\LoggerInterface;
use Shlinkio\Shlink\Core\Options\AppOptions;
use Shlinkio\Shlink\Core\Service;
use Shlinkio\Shlink\Rest\Service\ApiKeyService;
use Zend\I18n\Translator\Translator;
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
2016-07-19 10:07:59 -05:00
use Zend\ServiceManager\Factory\InvokableFactory;
return [
'dependencies' => [
2016-07-19 10:07:59 -05:00
'factories' => [
Authentication\JWTService::class => ConfigAbstractFactory::class,
ApiKeyService::class => ConfigAbstractFactory::class,
Action\AuthenticateAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\CreateShortUrlAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\SingleStepCreateShortUrlAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\EditShortUrlAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\DeleteShortUrlAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\ResolveShortUrlAction::class => ConfigAbstractFactory::class,
2018-05-03 11:04:00 -05:00
Action\Visit\GetVisitsAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\ListShortUrlsAction::class => ConfigAbstractFactory::class,
Action\ShortUrl\EditShortUrlTagsAction::class => ConfigAbstractFactory::class,
Action\Tag\ListTagsAction::class => ConfigAbstractFactory::class,
Action\Tag\DeleteTagsAction::class => ConfigAbstractFactory::class,
Action\Tag\CreateTagsAction::class => ConfigAbstractFactory::class,
Action\Tag\UpdateTagAction::class => ConfigAbstractFactory::class,
Middleware\BodyParserMiddleware::class => InvokableFactory::class,
2016-07-19 10:07:59 -05:00
Middleware\CrossDomainMiddleware::class => InvokableFactory::class,
Middleware\PathVersionMiddleware::class => InvokableFactory::class,
Middleware\ShortUrl\CreateShortUrlContentNegotiationMiddleware::class => InvokableFactory::class,
Middleware\ShortUrl\ShortCodePathMiddleware::class => InvokableFactory::class,
],
],
ConfigAbstractFactory::class => [
Authentication\JWTService::class => [AppOptions::class],
ApiKeyService::class => ['em'],
Action\AuthenticateAction::class => [
ApiKeyService::class,
Authentication\JWTService::class,
'translator',
'Logger_Shlink',
],
Action\ShortUrl\CreateShortUrlAction::class => [
Service\UrlShortener::class,
'translator',
'config.url_shortener.domain',
2017-10-12 03:13:20 -05:00
'Logger_Shlink',
2016-07-19 10:07:59 -05:00
],
Action\ShortUrl\SingleStepCreateShortUrlAction::class => [
Service\UrlShortener::class,
'translator',
ApiKeyService::class,
'config.url_shortener.domain',
'Logger_Shlink',
],
Action\ShortUrl\EditShortUrlAction::class => [Service\ShortUrlService::class, 'translator', 'Logger_Shlink'],
Action\ShortUrl\DeleteShortUrlAction::class => [
2018-09-15 05:56:17 -05:00
Service\ShortUrl\DeleteShortUrlService::class,
'translator',
'Logger_Shlink',
],
Action\ShortUrl\ResolveShortUrlAction::class => [
Service\UrlShortener::class,
'translator',
'config.url_shortener.domain',
],
2018-05-03 11:04:00 -05:00
Action\Visit\GetVisitsAction::class => [Service\VisitsTracker::class, 'translator', 'Logger_Shlink'],
Action\ShortUrl\ListShortUrlsAction::class => [
Service\ShortUrlService::class,
'translator',
'config.url_shortener.domain',
'Logger_Shlink',
],
Action\ShortUrl\EditShortUrlTagsAction::class => [
2018-05-03 11:05:16 -05:00
Service\ShortUrlService::class,
'translator',
'Logger_Shlink',
],
Action\Tag\ListTagsAction::class => [Service\Tag\TagService::class, LoggerInterface::class],
Action\Tag\DeleteTagsAction::class => [Service\Tag\TagService::class, LoggerInterface::class],
Action\Tag\CreateTagsAction::class => [Service\Tag\TagService::class, LoggerInterface::class],
Action\Tag\UpdateTagAction::class => [Service\Tag\TagService::class, Translator::class, LoggerInterface::class],
2016-07-19 10:07:59 -05:00
],
];