1 | <?php |
||
15 | class MethodFinder |
||
16 | { |
||
17 | /** |
||
18 | * @var ContainerInterface |
||
19 | */ |
||
20 | private $container; |
||
21 | |||
22 | /** |
||
23 | * @var LoggerInterface |
||
24 | */ |
||
25 | private $logger; |
||
26 | |||
27 | public function __construct(ContainerInterface $container, LoggerInterface $logger = null) |
||
32 | |||
33 | /** |
||
34 | * @param string $methodArg |
||
35 | * @param string|null $apiName |
||
36 | * @return Method |
||
37 | */ |
||
38 | public function find($methodArg, $apiName = null) |
||
60 | |||
61 | /** |
||
62 | * @param string|null $apiName |
||
63 | * @return Api |
||
64 | */ |
||
65 | private function getApi($apiName) |
||
75 | |||
76 | /** |
||
77 | * @param string|null $apiName |
||
78 | * @return string |
||
79 | */ |
||
80 | private function getApiServiceId($apiName) |
||
90 | |||
91 | /** |
||
92 | * @param string $methodArg |
||
93 | * @param object $method |
||
94 | */ |
||
95 | private function checkIsInstanceOfMethod($methodArg, $method) |
||
107 | } |
||
108 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: