This commit is contained in:
2021-04-14 17:51:32 +08:00
parent 8c263d7dd0
commit eb93e711ae
+2 -8
View File
@@ -211,7 +211,7 @@ class Loader extends BaseObject
public function loadByDirectory(string $path, ?string $outPath = null) public function loadByDirectory(string $path, ?string $outPath = null)
{ {
try { try {
$this->each($path, $outPath); $this->each($path);
} catch (Throwable $exception) { } catch (Throwable $exception) {
$this->addError($exception, 'throwable'); $this->addError($exception, 'throwable');
} }
@@ -244,9 +244,6 @@ class Loader extends BaseObject
{ {
$filePath = str_replace(directory('app'), '', $filePath); $filePath = str_replace(directory('app'), '', $filePath);
var_dump($filePath);
$directory = $this->splitDirectory($filePath); $directory = $this->splitDirectory($filePath);
array_pop($directory); array_pop($directory);
@@ -255,10 +252,6 @@ class Loader extends BaseObject
$tree = $this->getTree($tree, $value); $tree = $this->getTree($tree, $value);
} }
if ($filePath == '/Websocket/Connect.php') {
var_dump($tree);
}
if ($tree instanceof FileTree) { if ($tree instanceof FileTree) {
$tree->addFile($className); $tree->addFile($className);
} }
@@ -352,6 +345,7 @@ class Loader extends BaseObject
if (empty($classes)) { if (empty($classes)) {
return; return;
} }
var_dump($classes);
foreach ($classes as $className) { foreach ($classes as $className) {
$annotations = $this->_classes[$className] ?? null; $annotations = $this->_classes[$className] ?? null;
if ($annotations === null) { if ($annotations === null) {