改名
This commit is contained in:
@@ -142,14 +142,14 @@ class Loader extends BaseObject
|
|||||||
|
|
||||||
$this->_directory[rtrim($path->getRealPath(), '/')] = [];
|
$this->_directory[rtrim($path->getRealPath(), '/')] = [];
|
||||||
} else {
|
} else {
|
||||||
$this->readFile($path, $namespace);
|
|
||||||
|
|
||||||
$array = explode('/', $path->getRealPath());
|
$array = explode('/', $path->getRealPath());
|
||||||
array_pop($array);
|
array_pop($array);
|
||||||
|
|
||||||
$directory = implode('/', $array);
|
$directory = implode('/', $array);
|
||||||
|
|
||||||
$this->_directory[$directory][] = $path->getRealPath();
|
$this->_directory[$directory][] = $path->getRealPath();
|
||||||
|
|
||||||
|
$this->readFile($path, $namespace);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,12 +227,10 @@ class Loader extends BaseObject
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$path = '/' . trim($path, '/');
|
$path = '/' . trim($path, '/');
|
||||||
var_dump($path, $this->_directory);
|
|
||||||
if (!isset($this->_directory[$path])) {
|
if (!isset($this->_directory[$path])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
foreach ($this->_directory[$path] as $key => $_path) {
|
foreach ($this->_directory[$path] as $key => $_path) {
|
||||||
var_dump($key . '=>' . $path);
|
|
||||||
if (!str_contains($key, $path)) {
|
if (!str_contains($key, $path)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user