2016-07-19 11:01:39 -05:00
|
|
|
<?php
|
2019-10-05 10:26:10 -05:00
|
|
|
|
2017-10-12 03:13:20 -05:00
|
|
|
declare(strict_types=1);
|
2017-07-22 06:48:30 -05:00
|
|
|
|
2018-12-01 14:38:29 -06:00
|
|
|
namespace Shlinkio\Shlink\Core;
|
|
|
|
|
2020-01-01 14:11:53 -06:00
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
|
|
|
use Mezzio\Template\TemplateRendererInterface;
|
2019-07-13 05:04:21 -05:00
|
|
|
use Psr\EventDispatcher\EventDispatcherInterface;
|
2020-03-22 11:05:59 -05:00
|
|
|
use Shlinkio\Shlink\Core\Domain\Resolver;
|
2019-11-23 03:25:12 -06:00
|
|
|
use Shlinkio\Shlink\Core\ErrorHandler;
|
2019-11-02 12:33:26 -05:00
|
|
|
use Shlinkio\Shlink\Core\Options\NotFoundRedirectOptions;
|
2020-10-22 11:12:22 -05:00
|
|
|
use Shlinkio\Shlink\Importer\ImportedLinksProcessorInterface;
|
2016-07-19 11:01:39 -05:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
2016-07-31 09:30:05 -05:00
|
|
|
'dependencies' => [
|
2016-07-19 11:01:39 -05:00
|
|
|
'factories' => [
|
2019-11-23 03:25:12 -06:00
|
|
|
ErrorHandler\NotFoundRedirectHandler::class => ConfigAbstractFactory::class,
|
|
|
|
ErrorHandler\NotFoundTemplateHandler::class => ConfigAbstractFactory::class,
|
2018-12-01 14:38:29 -06:00
|
|
|
|
2018-11-03 05:37:43 -05:00
|
|
|
Options\AppOptions::class => ConfigAbstractFactory::class,
|
|
|
|
Options\DeleteShortUrlsOptions::class => ConfigAbstractFactory::class,
|
2019-11-02 11:23:21 -05:00
|
|
|
Options\NotFoundRedirectOptions::class => ConfigAbstractFactory::class,
|
2018-12-01 14:38:29 -06:00
|
|
|
Options\UrlShortenerOptions::class => ConfigAbstractFactory::class,
|
2016-08-07 07:44:33 -05:00
|
|
|
|
2017-07-22 06:48:30 -05:00
|
|
|
Service\UrlShortener::class => ConfigAbstractFactory::class,
|
|
|
|
Service\VisitsTracker::class => ConfigAbstractFactory::class,
|
|
|
|
Service\ShortUrlService::class => ConfigAbstractFactory::class,
|
2020-03-26 16:17:13 -05:00
|
|
|
Visit\VisitLocator::class => ConfigAbstractFactory::class,
|
2020-05-01 04:40:02 -05:00
|
|
|
Visit\VisitsStatsHelper::class => ConfigAbstractFactory::class,
|
2020-05-08 03:15:33 -05:00
|
|
|
Tag\TagService::class => ConfigAbstractFactory::class,
|
2018-09-15 05:56:17 -05:00
|
|
|
Service\ShortUrl\DeleteShortUrlService::class => ConfigAbstractFactory::class,
|
2020-01-26 12:21:51 -06:00
|
|
|
Service\ShortUrl\ShortUrlResolver::class => ConfigAbstractFactory::class,
|
2020-09-27 02:53:12 -05:00
|
|
|
Domain\DomainService::class => ConfigAbstractFactory::class,
|
2016-07-19 11:01:39 -05:00
|
|
|
|
2019-11-16 03:06:55 -06:00
|
|
|
Util\UrlValidator::class => ConfigAbstractFactory::class,
|
|
|
|
|
2017-07-22 06:48:30 -05:00
|
|
|
Action\RedirectAction::class => ConfigAbstractFactory::class,
|
2018-03-26 13:13:03 -05:00
|
|
|
Action\PixelAction::class => ConfigAbstractFactory::class,
|
2017-07-22 06:48:30 -05:00
|
|
|
Action\QrCodeAction::class => ConfigAbstractFactory::class,
|
2018-12-01 14:38:29 -06:00
|
|
|
|
2020-03-22 11:05:59 -05:00
|
|
|
Resolver\PersistenceDomainResolver::class => ConfigAbstractFactory::class,
|
2020-04-12 10:05:59 -05:00
|
|
|
|
|
|
|
Mercure\MercureUpdatesGenerator::class => ConfigAbstractFactory::class,
|
2020-10-22 11:12:22 -05:00
|
|
|
|
|
|
|
Importer\ImportedLinksProcessor::class => ConfigAbstractFactory::class,
|
|
|
|
],
|
|
|
|
|
|
|
|
'aliases' => [
|
|
|
|
ImportedLinksProcessorInterface::class => Importer\ImportedLinksProcessor::class,
|
2016-07-19 11:01:39 -05:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2017-07-22 06:48:30 -05:00
|
|
|
ConfigAbstractFactory::class => [
|
2019-11-23 03:25:12 -06:00
|
|
|
ErrorHandler\NotFoundRedirectHandler::class => [NotFoundRedirectOptions::class, 'config.router.base_path'],
|
|
|
|
ErrorHandler\NotFoundTemplateHandler::class => [TemplateRendererInterface::class],
|
2017-10-13 04:55:14 -05:00
|
|
|
|
2018-11-03 05:37:43 -05:00
|
|
|
Options\AppOptions::class => ['config.app_options'],
|
|
|
|
Options\DeleteShortUrlsOptions::class => ['config.delete_short_urls'],
|
2019-11-02 11:23:21 -05:00
|
|
|
Options\NotFoundRedirectOptions::class => ['config.not_found_redirects'],
|
2018-12-01 14:38:29 -06:00
|
|
|
Options\UrlShortenerOptions::class => ['config.url_shortener'],
|
2018-11-03 05:37:43 -05:00
|
|
|
|
2020-03-22 11:05:59 -05:00
|
|
|
Service\UrlShortener::class => [Util\UrlValidator::class, 'em', Resolver\PersistenceDomainResolver::class],
|
2020-05-08 06:10:58 -05:00
|
|
|
Service\VisitsTracker::class => [
|
|
|
|
'em',
|
|
|
|
EventDispatcherInterface::class,
|
2020-05-08 08:43:09 -05:00
|
|
|
'config.url_shortener.anonymize_remote_addr',
|
2020-05-08 06:10:58 -05:00
|
|
|
],
|
2020-03-22 11:22:52 -05:00
|
|
|
Service\ShortUrlService::class => ['em', Service\ShortUrl\ShortUrlResolver::class, Util\UrlValidator::class],
|
2020-03-26 16:17:13 -05:00
|
|
|
Visit\VisitLocator::class => ['em'],
|
2020-05-01 04:40:02 -05:00
|
|
|
Visit\VisitsStatsHelper::class => ['em'],
|
2020-05-08 03:15:33 -05:00
|
|
|
Tag\TagService::class => ['em'],
|
2020-02-01 15:54:02 -06:00
|
|
|
Service\ShortUrl\DeleteShortUrlService::class => [
|
|
|
|
'em',
|
|
|
|
Options\DeleteShortUrlsOptions::class,
|
|
|
|
Service\ShortUrl\ShortUrlResolver::class,
|
|
|
|
],
|
2020-01-26 12:21:51 -06:00
|
|
|
Service\ShortUrl\ShortUrlResolver::class => ['em'],
|
2020-09-27 02:53:12 -05:00
|
|
|
Domain\DomainService::class => ['em'],
|
2017-07-22 06:48:30 -05:00
|
|
|
|
2020-03-22 10:58:28 -05:00
|
|
|
Util\UrlValidator::class => ['httpClient', Options\UrlShortenerOptions::class],
|
2019-11-16 03:06:55 -06:00
|
|
|
|
2018-01-14 02:24:33 -06:00
|
|
|
Action\RedirectAction::class => [
|
2020-01-26 12:21:51 -06:00
|
|
|
Service\ShortUrl\ShortUrlResolver::class,
|
2018-01-14 02:24:33 -06:00
|
|
|
Service\VisitsTracker::class,
|
|
|
|
Options\AppOptions::class,
|
2020-06-17 12:01:56 -05:00
|
|
|
Options\UrlShortenerOptions::class,
|
2018-05-07 03:58:49 -05:00
|
|
|
'Logger_Shlink',
|
2018-01-14 02:24:33 -06:00
|
|
|
],
|
2018-03-26 13:13:03 -05:00
|
|
|
Action\PixelAction::class => [
|
2020-01-26 12:21:51 -06:00
|
|
|
Service\ShortUrl\ShortUrlResolver::class,
|
2018-03-26 13:13:03 -05:00
|
|
|
Service\VisitsTracker::class,
|
|
|
|
Options\AppOptions::class,
|
2018-05-07 03:58:49 -05:00
|
|
|
'Logger_Shlink',
|
2018-03-26 13:13:03 -05:00
|
|
|
],
|
2020-01-26 12:21:51 -06:00
|
|
|
Action\QrCodeAction::class => [
|
|
|
|
Service\ShortUrl\ShortUrlResolver::class,
|
2020-04-09 05:31:03 -05:00
|
|
|
'config.url_shortener.domain',
|
2020-01-26 12:21:51 -06:00
|
|
|
'Logger_Shlink',
|
|
|
|
],
|
2018-12-01 14:38:29 -06:00
|
|
|
|
2020-03-22 11:05:59 -05:00
|
|
|
Resolver\PersistenceDomainResolver::class => ['em'],
|
2020-04-12 10:05:59 -05:00
|
|
|
|
|
|
|
Mercure\MercureUpdatesGenerator::class => ['config.url_shortener.domain'],
|
2020-10-22 11:12:22 -05:00
|
|
|
|
|
|
|
Importer\ImportedLinksProcessor::class => ['em', Resolver\PersistenceDomainResolver::class],
|
2017-07-22 06:48:30 -05:00
|
|
|
],
|
|
|
|
|
2016-07-19 11:01:39 -05:00
|
|
|
];
|