These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php namespace Understand\UnderstandLaravel5\Handlers; |
||
2 | |||
3 | class LaravelQueueHandler extends BaseHandler |
||
4 | { |
||
5 | |||
6 | /** |
||
7 | * Send data to storage |
||
8 | * |
||
9 | * @param mixed $requestData |
||
10 | * @return type |
||
11 | */ |
||
12 | protected function send($requestData) |
||
13 | { |
||
14 | try |
||
15 | { |
||
16 | \Queue::push('Understand\UnderstandLaravel5\Handlers\LaravelQueueListener@listen', [ |
||
17 | 'requestData' => $requestData |
||
18 | ]); |
||
19 | } |
||
20 | catch (\Exception $ex) |
||
21 | { |
||
22 | if ( ! $this->silent) |
||
23 | { |
||
24 | throw new \Understand\UnderstandLaravel5\Exceptions\HandlerException($ex->getMessage(), $ex->getCode(), $ex); |
||
25 | } |
||
26 | } |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Serialize data and send to storage |
||
31 | * |
||
32 | * @param array $requestData |
||
33 | * @return array |
||
34 | */ |
||
35 | public function handle(array $requestData) |
||
36 | { |
||
37 | return $this->send($requestData); |
||
0 ignored issues
–
show
Bug
Compatibility
introduced
by
Loading history...
|
|||
38 | } |
||
39 | |||
40 | } |
||
41 |