mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
initialize webhook with worker
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
namespace Alchemy\Phrasea\Model\Manipulator;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\WebhookEvent;
|
||||
use Alchemy\Phrasea\Webhook\WebhookPublisher;
|
||||
use Alchemy\Phrasea\Webhook\WebhookPublisherInterface;
|
||||
use Doctrine\Common\Persistence\ObjectManager;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
@@ -29,11 +29,11 @@ class WebhookEventManipulator implements ManipulatorInterface
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* @var WebhookPublisher
|
||||
* @var WebhookPublisherInterface
|
||||
*/
|
||||
private $publisher;
|
||||
|
||||
public function __construct(ObjectManager $om, EntityRepository $repo, WebhookPublisher $publisher)
|
||||
public function __construct(ObjectManager $om, EntityRepository $repo, WebhookPublisherInterface $publisher)
|
||||
{
|
||||
$this->om = $om;
|
||||
$this->repository = $repo;
|
||||
|
@@ -19,7 +19,7 @@ use Alchemy\Queue\MessageQueueRegistry;
|
||||
* Class WebhookPublisher publishes webhook event notifications in message queues
|
||||
* @package Alchemy\Phrasea\Webhook
|
||||
*/
|
||||
class WebhookPublisher
|
||||
class WebhookPublisher implements WebhookPublisherInterface
|
||||
{
|
||||
/**
|
||||
* @var MessageQueueRegistry
|
||||
|
10
lib/Alchemy/Phrasea/Webhook/WebhookPublisherInterface.php
Normal file
10
lib/Alchemy/Phrasea/Webhook/WebhookPublisherInterface.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Phrasea\Webhook;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\WebhookEvent;
|
||||
|
||||
interface WebhookPublisherInterface
|
||||
{
|
||||
public function publishWebhookEvent(WebhookEvent $event);
|
||||
}
|
Reference in New Issue
Block a user