| 1 | <?php |
||
| 14 | abstract class AbstractHandler implements HandlerInterface |
||
| 15 | { |
||
| 16 | use ContainerAwareTrait; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string Job唯一标识 |
||
| 20 | */ |
||
| 21 | protected $id; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $body; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string $id |
||
| 30 | */ |
||
| 31 | public function setId($id) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $body |
||
| 38 | */ |
||
| 39 | public function setBody(array $body) |
||
| 43 | |||
| 44 | public function run() |
||
| 57 | |||
| 58 | protected function setUp() { } |
||
| 59 | |||
| 60 | protected function tearDown() { } |
||
| 61 | |||
| 62 | abstract protected function perform(); |
||
| 63 | } |