2019-07-13 12:04:21 +02:00
|
|
|
<?php
|
2019-10-05 17:26:10 +02:00
|
|
|
|
2019-07-13 12:04:21 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Shlinkio\Shlink\Core;
|
|
|
|
|
2020-01-01 21:11:53 +01:00
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
2019-12-28 13:07:11 +01:00
|
|
|
use Psr\EventDispatcher\EventDispatcherInterface;
|
2019-07-20 11:21:00 +02:00
|
|
|
use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater;
|
2019-08-10 13:56:06 +02:00
|
|
|
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
2019-07-13 12:04:21 +02:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'events' => [
|
2019-12-28 13:50:41 +01:00
|
|
|
'regular' => [
|
|
|
|
EventDispatcher\VisitLocated::class => [
|
|
|
|
EventDispatcher\NotifyVisitToWebHooks::class,
|
|
|
|
],
|
|
|
|
],
|
2019-07-18 19:07:07 +02:00
|
|
|
'async' => [
|
|
|
|
EventDispatcher\ShortUrlVisited::class => [
|
|
|
|
EventDispatcher\LocateShortUrlVisit::class,
|
|
|
|
],
|
2019-07-13 12:04:21 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
'dependencies' => [
|
2019-07-13 15:43:54 +02:00
|
|
|
'factories' => [
|
|
|
|
EventDispatcher\LocateShortUrlVisit::class => ConfigAbstractFactory::class,
|
2019-12-28 13:50:41 +01:00
|
|
|
EventDispatcher\NotifyVisitToWebHooks::class => ConfigAbstractFactory::class,
|
2019-07-13 15:43:54 +02:00
|
|
|
],
|
2019-07-13 12:04:21 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
ConfigAbstractFactory::class => [
|
2019-07-20 11:21:00 +02:00
|
|
|
EventDispatcher\LocateShortUrlVisit::class => [
|
|
|
|
IpLocationResolverInterface::class,
|
|
|
|
'em',
|
|
|
|
'Logger_Shlink',
|
|
|
|
GeolocationDbUpdater::class,
|
2019-12-28 13:07:11 +01:00
|
|
|
EventDispatcherInterface::class,
|
2019-07-20 11:21:00 +02:00
|
|
|
],
|
2019-12-27 09:25:07 +01:00
|
|
|
EventDispatcher\NotifyVisitToWebHooks::class => [
|
|
|
|
'httpClient',
|
|
|
|
'em',
|
|
|
|
'Logger_Shlink',
|
|
|
|
'config.url_shortener.visits_webhooks',
|
2019-12-27 17:07:20 +01:00
|
|
|
'config.url_shortener.domain',
|
2019-12-28 13:50:41 +01:00
|
|
|
Options\AppOptions::class,
|
2019-12-27 09:25:07 +01:00
|
|
|
],
|
2019-07-13 12:04:21 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|