PHP code example of bzrk / eventsauce-messagestorage-gcp
1. Go to this page and download the library: Download bzrk/eventsauce-messagestorage-gcp 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/ */
bzrk / eventsauce-messagestorage-gcp example snippets
$firestoreClient = new FirestoreClient();
$this->messageRepository = new MessageRepository(
$firestoreClient,
'collectionForAggregateEvents',
new ConstructingMessageSerializer()
);
$this->snapshotRepository = new SnapshotRepository(
$firestoreClient,
'collectionForAggregateSnapshots'
);
$datastoreClient = new DatastoreClient();
$this->messageRepository = new MessageRepository(
$datastoreClient,
'collectionForAggregateEvents',
new ConstructingMessageSerializer()
);
$this->snapshotRepository = new SnapshotRepository(
$datastoreClient,
'collectionForAggregateSnapshots'
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.