Download the PHP package spriebsch/sequora without Composer
On this page you can find all versions of the php package spriebsch/sequora. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spriebsch/sequora
More information about spriebsch/sequora
Files in spriebsch/sequora
Package sequora
Short Description A simple, reliable SQLite-backed event store for PHP domain events
License
Informations about the package sequora
Sequora
The Next-Generation Event Store.
Sequora is a made-up word combining the components sequence and aura. Sequence because an event store must store events in a strict sequence. Aura because it is a source of insight and knowledge and represents the fact that an event store is the authoritative source of truth in an event-based system.
Sequora was created by Stefan Priebsch [email protected].
Installation
Install Sequora via Composer:
Usage
Initializing the Event Store
Sequora uses SQLite as its storage engine. You need to provide a SqliteConnection and initialize the schema.
Writing Events
To write events, use the SequoraWriter. It accepts DomainEvent instances.
Reading Events
To read events, use the SequoraReader. You need to provide a topic map that maps event topics to their corresponding PHP classes.
Generating a Topic Map
You can generate a topic map by running the generate-topic-map tool. It scans a directory for classes that implement DomainEvent and have a Topic attribute. The generated file TopicMap.php will be placed in the specified directory.
The generated file returns an associative array that you can use when initializing the SqliteDatabaseReader:
Querying Events
You can filter events using EventQuery.
All versions of sequora with dependencies
spriebsch/domain-event Version ^2.0
spriebsch/sqlite Version ^2.1
ext-sqlite3 Version *