PHP code example of andreo / eventsauce-aggregate
1. Go to this page and download the library: Download andreo/eventsauce-aggregate 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/ */
andreo / eventsauce-aggregate example snippets
use EventSauce\EventSourcing\AggregateRoot;
use Andreo\EventSauce\Aggregate\Reconstruction\EventSourcingHandler;
use Andreo\EventSauce\Aggregate\Reconstruction\AggregateRootBehaviourWithAppliesEventsByAttribute;
final class FooAggregate implements AggregateRoot
{
use AggregateRootBehaviourWithAppliesEventsByAttribute;
#[EventSourcingHandler]
public function onFooInitiated(FooInitiated $event): void
{
}
}