Merge pull request #1218 from hinikato/autoloader_map_fix
Fixed class normalization for class map case.pull/1220/head
commit
ad4eb72d87
|
@ -162,14 +162,14 @@ class ClassLoader
|
||||||
*/
|
*/
|
||||||
public function findFile($class)
|
public function findFile($class)
|
||||||
{
|
{
|
||||||
if (isset($this->classMap[$class])) {
|
|
||||||
return $this->classMap[$class];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ('\\' == $class[0]) {
|
if ('\\' == $class[0]) {
|
||||||
$class = substr($class, 1);
|
$class = substr($class, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($this->classMap[$class])) {
|
||||||
|
return $this->classMap[$class];
|
||||||
|
}
|
||||||
|
|
||||||
if (false !== $pos = strrpos($class, '\\')) {
|
if (false !== $pos = strrpos($class, '\\')) {
|
||||||
// namespaced class name
|
// namespaced class name
|
||||||
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
|
$classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
|
||||||
|
|
Loading…
Reference in New Issue