Initial commit
This commit is contained in:
30
src/Command/MessengerCommandBus.php
Normal file
30
src/Command/MessengerCommandBus.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of the zapoyok.info project.
|
||||
* (c) <zapoyok.info> <jerome.fix@zapoyok.info>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Zapoyok\CQRSBundle\Command;
|
||||
|
||||
use Symfony\Component\Messenger\MessageBusInterface;
|
||||
|
||||
final class MessengerCommandBus implements CommandBusInterface
|
||||
{
|
||||
private MessageBusInterface $commandBus;
|
||||
|
||||
public function __construct(MessageBusInterface $commandBus)
|
||||
{
|
||||
$this->commandBus = $commandBus;
|
||||
}
|
||||
|
||||
public function dispatch(CommandInterface $command): void
|
||||
{
|
||||
$this->commandBus->dispatch($command);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user