Added basic implementation for new webhook events

This commit is contained in:
Alejandro Celaya
2019-12-27 09:25:07 +01:00
parent 34d8b396a4
commit 3fdba53995
4 changed files with 106 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\Core;
use GuzzleHttp\ClientInterface;
use Shlinkio\Shlink\CLI\Util\GeolocationDbUpdater;
use Shlinkio\Shlink\IpGeolocation\Resolver\IpLocationResolverInterface;
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
@@ -16,6 +17,9 @@ return [
EventDispatcher\ShortUrlVisited::class => [
EventDispatcher\LocateShortUrlVisit::class,
],
EventDispatcher\ShortUrlLocated::class => [
EventDispatcher\NotifyVisitToWebHooks::class,
],
],
],
@@ -32,6 +36,12 @@ return [
'Logger_Shlink',
GeolocationDbUpdater::class,
],
EventDispatcher\NotifyVisitToWebHooks::class => [
'httpClient',
'em',
'Logger_Shlink',
'config.url_shortener.visits_webhooks',
],
],
];