@@ 121-123 (lines=3) @@ | ||
118 | protected function resolveClass($class, array $namespaces, $interface = null) |
|
119 | { |
|
120 | $class = ucfirst(trim($class, '\\')); |
|
121 | if (class_exists($class) && (($interface === null) || in_array($interface, class_implements($class), true))) { |
|
122 | return $class; |
|
123 | } |
|
124 | foreach ($namespaces as $ns) { |
|
125 | $fqcn = $ns . '\\' . $class; |
|
126 | if (class_exists($fqcn) && (($interface === null) || in_array($interface, class_implements($fqcn), true))) { |
|
@@ 126-128 (lines=3) @@ | ||
123 | } |
|
124 | foreach ($namespaces as $ns) { |
|
125 | $fqcn = $ns . '\\' . $class; |
|
126 | if (class_exists($fqcn) && (($interface === null) || in_array($interface, class_implements($fqcn), true))) { |
|
127 | return $fqcn; |
|
128 | } |
|
129 | } |
|
130 | return null; |
|
131 | } |