mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-24 13:49:03 +03:00
52 lines
1.5 KiB
PHP
52 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Core;
|
|
|
|
use Psr\EventDispatcher\EventDispatcherInterface;
|
|
use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater;
|
|
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
|
|
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
|
|
|
return [
|
|
|
|
'events' => [
|
|
'regular' => [
|
|
EventDispatcher\VisitLocated::class => [
|
|
EventDispatcher\NotifyVisitToWebHooks::class,
|
|
],
|
|
],
|
|
'async' => [
|
|
EventDispatcher\ShortUrlVisited::class => [
|
|
EventDispatcher\LocateShortUrlVisit::class,
|
|
],
|
|
],
|
|
],
|
|
|
|
'dependencies' => [
|
|
'factories' => [
|
|
EventDispatcher\LocateShortUrlVisit::class => ConfigAbstractFactory::class,
|
|
EventDispatcher\NotifyVisitToWebHooks::class => ConfigAbstractFactory::class,
|
|
],
|
|
],
|
|
|
|
ConfigAbstractFactory::class => [
|
|
EventDispatcher\LocateShortUrlVisit::class => [
|
|
IpLocationResolverInterface::class,
|
|
'em',
|
|
'Logger_Shlink',
|
|
GeolocationDbUpdater::class,
|
|
EventDispatcherInterface::class,
|
|
],
|
|
EventDispatcher\NotifyVisitToWebHooks::class => [
|
|
'httpClient',
|
|
'em',
|
|
'Logger_Shlink',
|
|
'config.url_shortener.visits_webhooks',
|
|
'config.url_shortener.domain',
|
|
Options\AppOptions::class,
|
|
],
|
|
],
|
|
|
|
];
|