1 | <?php |
||
10 | abstract class AnswerBus |
||
11 | { |
||
12 | /** |
||
13 | * @var Api |
||
14 | */ |
||
15 | protected $telegram; |
||
16 | |||
17 | /** |
||
18 | * Handle calls to missing methods. |
||
19 | * |
||
20 | * @param string $method |
||
21 | * @param array $parameters |
||
22 | * |
||
23 | * @return mixed |
||
24 | * |
||
25 | * @throws \BadMethodCallException |
||
26 | */ |
||
27 | 10 | public function __call($method, $parameters) |
|
35 | |||
36 | /** |
||
37 | * @return Api |
||
38 | */ |
||
39 | public function getTelegram() |
||
43 | |||
44 | /** |
||
45 | * Use PHP Reflection and Laravel Container to instantiate the answer with type hinted dependencies. |
||
46 | * |
||
47 | * @param $answerClass |
||
48 | * |
||
49 | * @return object |
||
50 | */ |
||
51 | 2 | protected function buildDependencyInjectedAnswer($answerClass) |
|
79 | } |
||
80 |