PHP code example of eventsauce / message-repository-for-doctrine
1. Go to this page and download the library: Download eventsauce/message-repository-for-doctrine 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/ */
eventsauce / message-repository-for-doctrine example snippets
use EventSauce\MessageRepository\DoctrineMessageRepository\DoctrineUuidV4MessageRepository;
use EventSauce\MessageRepository\TableSchema\DefaultTableSchema;
use EventSauce\UuidEncoding\BinaryUuidEncoder;
$messageRepository = new DoctrineUuidV4MessageRepository(
connection: $doctrineDbalConnection,
tableName: $tableName,
serializer: $eventSauceMessageSerializer,
tableSchema: new DefaultTableSchema(), // optional
uuidEncoder: new BinaryUuidEncoder(), // optional
);