Skip to content

Commit

Permalink
Merge pull request #27 from UFOMelkor/feature/documentation
Browse files Browse the repository at this point in the history
[WIP] Documentation
  • Loading branch information
codeliner committed Oct 5, 2019
2 parents b8fbad7 + db4c432 commit bee69da
Show file tree
Hide file tree
Showing 6 changed files with 790 additions and 4 deletions.
11 changes: 7 additions & 4 deletions doc/bookdown.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"title": "prooph event-store Symfony bundle",
"content": [
{"getting-started": "book/getting-started/bookdown.json"},
{"reference": "book/reference/bookdown.json"},
{"contribute": "book/contribute/bookdown.json"}
{"intro": "../README.md"},
{"getting_started": "getting_started.md"},
{"event_store": "event_store.md"},
{"projection_manager": "projection_manager.md"},
{"event_store_bus_bridge": "event_store_bus_bridge.md"},
{"configuration_reference": "configuration_reference.md"}
],
"target": "./html",
"tocDepth": 2,
"template": "../vendor/tobiju/bookdown-bootswatch-templates/templates/main.php",
"template": "../vendor/prooph/bookdown-template/templates/main.php",
"copyright": "Copyright (c) 2016 - 2019 <a href=\"http://getprooph.org/\" title=\"prooph maintainers\">prooph maintainers</a> <br/> Powered by <a href=\"https://github.com/tobiju/bookdown-bootswatch-templates\" title=\"Visit project to generate your own docs\">Bookdown Bootswatch Templates</a>"
}
131 changes: 131 additions & 0 deletions doc/configuration_reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Configuration Reference

```yaml
prooph_event_store:
stores:
acme_store:
event_emitter: Prooph\Common\Event\ProophActionEventEmitter
wrap_action_event_emitter: true
event_store: Prooph\EventStore\Pdo\MysqlEventStore
repositories:
todo_list:
repository_class: Prooph\ProophessorDo\Infrastructure\Repository\EventStoreUserCollection
aggregate_type: Prooph\ProophessorDo\Model\User\User
aggregate_translator: prooph_event_sourcing.aggregate_translator
snapshot_store: ~
stream_name: ~
one_stream_per_aggregate: false
projection_managers:
main_manager:
event_store: Prooph\EventStore\Pdo\MysqlEventStore
connection: 'doctrine.pdo.connection'
event_streams_table: 'event_streams'
projection_table: 'projections'
projections:
user_projection:
read_model: Prooph\ProophessorDo\Projection\User\UserReadModel
projection: Prooph\ProophessorDo\Projection\User\UserProjection
```

## stores

*Optional*

This section contains the configuration of your event stores.
Please have a look at [the event store section](./event_store.md) of this documentation for further details.
The name of the event store will be part of its service id: `prooph_event_store.<name>`.
For the `acme_store` in our example above it will be `prooph_event_store.acme_store`.

### event_emitter

*Optional*

The event emitter that is used by the ActionEventEmitterEventStore.
It must be a class that implements `Prooph\Common\Event\ActionEventEmitter`.
The default value should be fine for most use cases.


### wrap_action_event_emitter

*Optional*

Should the given event store be decorated by an ActionEventEmitterEventStore?
In most cases you should keep this with the default value `true`.


### event_store

*Required*

The id of a service whose class implements `Prooph\EventStore\EventStore`.
Please have a look at [the event store section](./event_store.md) of this documentation for further details.


### repositories

*Optional*

Defines the repository that you can use to load and store your aggregates.
For further details please have a look at [the event store section](./event_store.md) of this documentation.


#### repository_class

*Required*

The FQCN of the repository.
In most cases it will be a subclass of `Prooph\EventSourcing\Aggregate\AggregateRepository` but it most not be,
it must just accept the same arguments in the constructor.


#### aggregate_type

*Required*

The FQCN of the aggregate that is loaded and stored by the repository.


## aggregate_translator

*Required*

The service id of the aggregate translator that is used by the repository.
Its class must implement `Prooph\EventSourcing\Aggregate\AggregateTranslator`.

#### snapshot_store

*Optional*

The service id of a snap shot store.
Its class must implement `Prooph\SnapshotStore\SnapshotStore`.

#### stream_name

*Optional*

You can pass a string as custom stream name if you want.


#### one_stream_per_aggregate

*Optional*

Should the repository create an own single stream for each aggregate?
See section *Using different Stream Strategies* for of [the event store section](./event_store.md) of this documentation for further details.


## projection_managers

### event_store

### connection

### event_streams_table

### projection_table

### projections

#### read_model

#### projection

0 comments on commit bee69da

Please sign in to comment.