PHP code example of danielkorytek / messenger-bridge-bundle
1. Go to this page and download the library: Download danielkorytek/messenger-bridge-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
danielkorytek / messenger-bridge-bundle example snippets
declare(strict_types=1);
namespace App\SharedEventBus;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
class SaasAttendanceSubscriber implements MessageSubscriberInterface
{
public function __invoke(MessageClass $messageClass): Envelope
{
return new Envelope($messageClass);
}
public static function getHandledMessages(): iterable
{
yield MessageClass::class => [
'bus' => 'shared.message.bus',
];
}
}