Skip to content

Commit

Permalink
EVENT_PROJECTIONS.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Cassani committed Aug 29, 2017
1 parent a0b5c6e commit dcdfba7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/EVENT_PROJECTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Create a Projector and extend `Projector` abstract class.
You must implement three methods:

* `subcribedEvents` method to subscribe for events to handle
* `applyNameOfEvent` method for handling subscribed events
* `rollbackNameOfEvent` method for rollback changes made by subscribed events
* `applyNameOfEvent` method for handling a subscribed event
* `rollbackNameOfEvent` method for rollback changes made by s subscribed event

Consider this example:

Expand Down Expand Up @@ -46,11 +46,11 @@ class UserProjector extends Projector
}

public function rollbackUserWasCreated(UserWasCreated $event)
{
$userData = $event->body();
$this->repo->delete($userData['id']);
}
{
$userData = $event->body();

$this->repo->delete($userData['id']);
}
}

class UserWasCreated extends Event
Expand Down

0 comments on commit dcdfba7

Please sign in to comment.