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