mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 17:44:44 +08:00
Moved Mercure and RabbitMq event listeners to their own subnamespaces
This commit is contained in:
21
module/Core/src/EventDispatcher/Event/ShortUrlCreated.php
Normal file
21
module/Core/src/EventDispatcher/Event/ShortUrlCreated.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher\Event;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||
final class ShortUrlCreated implements JsonSerializable
|
||||
{
|
||||
public function __construct(public readonly string $shortUrlId)
|
||||
{
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array
|
||||
{
|
||||
return [
|
||||
'shortUrlId' => $this->shortUrlId,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher\Mercure;
|
||||
|
||||
use Shlinkio\Shlink\Core\EventDispatcher\Event\ShortUrlCreated;
|
||||
|
||||
class NotifyNewShortUrlToMercure
|
||||
{
|
||||
public function __invoke(ShortUrlCreated $shortUrlCreated)
|
||||
{
|
||||
// TODO: Implement __invoke() method.
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher;
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher\Mercure;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher\RabbitMq;
|
||||
|
||||
use Shlinkio\Shlink\Core\EventDispatcher\Event\ShortUrlCreated;
|
||||
|
||||
class NotifyNewShortUrlToRabbitMq
|
||||
{
|
||||
public function __invoke(ShortUrlCreated $shortUrlCreated)
|
||||
{
|
||||
// TODO: Implement __invoke() method.
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher;
|
||||
namespace Shlinkio\Shlink\Core\EventDispatcher\RabbitMq;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use PhpAmqpLib\Connection\AMQPStreamConnection;
|
||||
Reference in New Issue
Block a user