@@ 350-360 (lines=11) @@ | ||
347 | $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
348 | ||
349 | $first = $class[0]; |
|
350 | if (isset($this->prefixLengthsPsr4[$first])) { |
|
351 | foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { |
|
352 | if (0 === strpos($class, $prefix)) { |
|
353 | foreach ($this->prefixDirsPsr4[$prefix] as $dir) { |
|
354 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { |
|
355 | return $file; |
|
356 | } |
|
357 | } |
|
358 | } |
|
359 | } |
|
360 | } |
|
361 | ||
362 | // PSR-4 fallback dirs |
|
363 | foreach ($this->fallbackDirsPsr4 as $dir) { |
|
@@ 379-389 (lines=11) @@ | ||
376 | $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
377 | } |
|
378 | ||
379 | if (isset($this->prefixesPsr0[$first])) { |
|
380 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
|
381 | if (0 === strpos($class, $prefix)) { |
|
382 | foreach ($dirs as $dir) { |
|
383 | if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
384 | return $file; |
|
385 | } |
|
386 | } |
|
387 | } |
|
388 | } |
|
389 | } |
|
390 | ||
391 | // PSR-0 fallback dirs |
|
392 | foreach ($this->fallbackDirsPsr0 as $dir) { |