public function findPath($namespace, $forceDir = false)
{
$loader = static::originalInstance();
$paths = static::getPrefixes();
$logicalPath = trim(strtr($namespace, '\\', DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);
foreach ($paths as $prefix => $dirs) {
if (strpos($namespace, $prefix) !== 0) {
continue;
}
foreach ($dirs as $dir) {
$root = $dir . DIRECTORY_SEPARATOR . substr($logicalPath, strlen($prefix));
if ($path = $this->_path($root, $forceDir)) {
return realpath($path);
}
}
}
}