Example #1
0
 public function __construct()
 {
     parent::__construct(function (Command $command) {
         return $command->getAggregateRoot();
     });
     $this->setGetAggregateIdentifierCallback(function (Command $command) {
         return $command->getAggregateIdentifier();
     });
 }
Example #2
0
 private function objectApplication()
 {
     return $this->application(new CascadingAggregateFactory((new CallbackAggregateFactory())->setHandleMethodCallback(function () {
         return 'handle';
     }), ObjectAggregateFactory::genericRoot()));
 }
Example #3
0
 private function application()
 {
     return new GenericApplication($this->store, ObjectAggregateFactory::staticRoot(new ObjectBasedSpec_FooAggregate()), ObjectProjectionFactory::staticProjection(new ObjectBasedSpec_FooProjection()));
 }