改名
This commit is contained in:
+12
-12
@@ -272,23 +272,23 @@ class Loader extends BaseObject
|
|||||||
public function appendFileToDirectory(string $filePath, string $className)
|
public function appendFileToDirectory(string $filePath, string $className)
|
||||||
{
|
{
|
||||||
$array = explode('/', $filePath);
|
$array = explode('/', $filePath);
|
||||||
array_pop($array);
|
unset($array[count($array) - 1]);
|
||||||
|
|
||||||
$array = '/' . trim(implode('/', $array), '/');
|
$array = '/' . trim(implode('/', $array), '/');
|
||||||
|
|
||||||
$this->_directory[$array][] = $className;
|
$this->_directory[$array][] = $className;
|
||||||
|
|
||||||
$directory = $this->splitDirectory($filePath);
|
// $directory = $this->splitDirectory($filePath);
|
||||||
array_pop($directory);
|
// array_pop($directory);
|
||||||
|
//
|
||||||
$tree = null;
|
// $tree = null;
|
||||||
foreach ($directory as $value) {
|
// foreach ($directory as $value) {
|
||||||
$tree = $this->getTree($tree, $value);
|
// $tree = $this->getTree($tree, $value);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if ($tree instanceof FileTree) {
|
// if ($tree instanceof FileTree) {
|
||||||
$tree->addFile($className, $filePath);
|
// $tree->addFile($className, $filePath);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user