/**
  * Creates a new EventSourcingRepository with the given parameters.
  * 
  * @param string $className
  * @param EventBusInterface $eventBus
  * @param LockManagerInterface $lockManager
  * @param EventStoreInterface $eventStore
  * @param AggregateFactoryInterface $factory
  */
 public function __construct($className, EventBusInterface $eventBus, LockManagerInterface $lockManager, EventStoreInterface $eventStore, AggregateFactoryInterface $factory = null)
 {
     $this->validateEventSourcedAggregate($className);
     parent::__construct($className, $eventBus, $lockManager);
     $this->eventStore = $eventStore;
     $this->factory = null === $factory ? new GenericAggregateFactory($className) : $factory;
     $this->conflictResolver = null;
 }
 public function __construct($className, EventBusInterface $eventBus, LockManagerInterface $lockManager)
 {
     parent::__construct($className, $eventBus, $lockManager);
 }
Ejemplo n.º 3
0
 public function __construct($className, EventBusInterface $eventBus, LockManagerInterface $lockManager, EntityManager $entityManager)
 {
     parent::__construct($className, $eventBus, $lockManager);
     $this->entityManager = $entityManager;
 }