1 | <?php |
||
2 | |||
3 | namespace Anax\Service; |
||
4 | |||
5 | use Anax\Commons\ContainerInjectableInterface; |
||
6 | use Anax\Commons\ContainerInjectableTrait; |
||
7 | |||
8 | /** |
||
9 | * API Service class |
||
10 | * |
||
11 | * @SuppressWarnings(PHPMD) |
||
12 | */ |
||
13 | class APIService |
||
14 | { |
||
15 | use ContainerInjectableTrait; |
||
16 | |||
17 | private $keyChain = null; |
||
18 | private $service = null; |
||
19 | private $services = null; |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
20 | |||
21 | public function setKeyChain(array $key) : void |
||
22 | { |
||
23 | $this->keyChain = $key; |
||
24 | } |
||
25 | |||
26 | public function setServiceToLoad(string $service) : void |
||
27 | { |
||
28 | $this->service = $service; |
||
29 | } |
||
30 | |||
31 | public function getKeyToService() |
||
32 | { |
||
33 | $service = $this->service; |
||
34 | $keyChain = $this->keyChain; |
||
35 | // if (array_key_exists($service, $keyChain)) { |
||
36 | return $keyChain[$service]; |
||
37 | // } |
||
38 | } |
||
39 | } |
||
40 |