Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikvv authored Oct 12, 2016
1 parent 6b62fd3 commit 6fe42a3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ $scope->markSuccessful();
unset($scope);
```

Obviously your logic will be different depending on the structure of your application and the requirements.
Probably you will find onFailure the most useful for doing rollbacks, attaching more handlers as the script progresses, and entering the failure flow by throwing an exception.

Probably you will find onFailure the most useful for doing rollbacks. OnSuccess will generally not be used because your normal code is the success case, but it may help to group some statements more logically. OnExit can be used for something like cleanup which must be done regardless of what the eventual outcome of the script was.
OnSuccess will generally not be used because your normal code is the success case, but it may help to group some statements more logically.

It is perfectly fine to use multiple Scope object at the same time.

## Todo
OnExit can be used for something like cleanup which must be done regardless of what the eventual outcome of the script was.

More examples

Some might find the need to remove handlers or mark failure after marking success earlier.
It is perfectly fine to use multiple Scope object at the same time.

0 comments on commit 6fe42a3

Please sign in to comment.