1 | <?php |
||
8 | class ServiceCaller extends AbstractServiceCaller |
||
9 | { |
||
10 | /** |
||
11 | * The container implementation. |
||
12 | * |
||
13 | * @var \Illuminate\Contracts\Container\Container |
||
14 | */ |
||
15 | protected $container; |
||
16 | |||
17 | /** |
||
18 | * The handler method to be called. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | public static $handlerMethod; |
||
23 | |||
24 | /** |
||
25 | * Create a new service caller instance. |
||
26 | * |
||
27 | * @param \Illuminate\Contracts\Container\Container $container |
||
28 | */ |
||
29 | public function __construct(Container $container) |
||
33 | |||
34 | /** |
||
35 | * Call a service through its appropriate handler. |
||
36 | * |
||
37 | * @param string $service |
||
38 | * @param mixed ...$params |
||
39 | * |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function call($service, ...$params) |
||
50 | |||
51 | /** |
||
52 | * Determine if the service handler method exists. |
||
53 | * |
||
54 | * @param mixed $service |
||
55 | * |
||
56 | * @return bool |
||
57 | */ |
||
58 | public function hasHandler($service) |
||
62 | } |
||
63 |