Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
toplan committed Dec 7, 2015
1 parent 43966f3 commit 4385ab2
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ get data value of task instance.

## 2. Task Lifecycle

| Hook name | handler arguments | handler return value |
> support multiple handlers for every hook!
###Hooks Table

| Hook name | handler arguments | influence of the last handler`s return value |
| --------- | :----------------: | :-----: |
| beforeCreateDriver | $task, $preReturn, $index | no effect |
| afterCreateDriver | $task, $preReturn, $index | no effect |
Expand All @@ -171,21 +175,24 @@ get data value of task instance.
| afterDriverRun | $task, $preReturn, $index | no effect |
| afterRun | $task, $results, $preReturn, $index | if not boolean will override result value |

### $task->hook($hookName, $handler, $override)
###Use Hooks

> `$override` default value is `false`, if `true` will override hook handlers.
* $task->hook($hookName, $handler, $override)

### $task->beforeCreateDriver($handler, $override)
* $task->beforeCreateDriver($handler, $override)

### $task->afterCreateDriver($handler, $override)
* $task->afterCreateDriver($handler, $override)

### $task->beforeRun($handler, $override)
* $task->beforeRun($handler, $override)

### $task->beforeDriverRun($handler, $override)
* $task->beforeDriverRun($handler, $override)

### $task->afterDriverRun($handler, $override)
* $task->afterDriverRun($handler, $override)

### $task->afterRun($handler, $override)
* $task->afterRun($handler, $override)

> `$override` default value is `false`, if `true` will override hooks handler.

```php
//example
Expand Down

0 comments on commit 4385ab2

Please sign in to comment.