1 | <?php namespace Understand\UnderstandLaravel5\Handlers; |
||
3 | class CallbackHandler extends BaseHandler |
||
4 | { |
||
5 | |||
6 | /** |
||
7 | * Callback |
||
8 | * |
||
9 | * @var callable |
||
10 | */ |
||
11 | protected $callback; |
||
12 | |||
13 | /** |
||
14 | * Set callback |
||
15 | * |
||
16 | * @param type $callback |
||
17 | * @return void |
||
|
|||
18 | */ |
||
19 | public function __construct($callback) |
||
23 | |||
24 | /** |
||
25 | * Call user defined callback with request data |
||
26 | * |
||
27 | * @param mixed $requestData |
||
28 | * @return mixed |
||
29 | */ |
||
30 | protected function send($requestData) |
||
34 | } |
||
35 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.