From 81250722ea826cdadff68aedba4f2d07827f208e Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 24 Jun 2026 20:45:36 +0800 Subject: [PATCH] eee --- Scanner.php | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/Scanner.php b/Scanner.php index 6e58b93..0a14a81 100644 --- a/Scanner.php +++ b/Scanner.php @@ -466,16 +466,26 @@ class Scanner extends Component return array_map(fn($attr) => $attr->getName(), $reflect->getAttributes()); } - public function getStats(): array - { - return [ - 'total_files' => count($this->files), - 'cached_mtimes' => count($this->fileMtimes), - 'base_path' => $this->basePath, - 'config' => $this->config, - 'manifest_entries' => count($this->manifest->all()), - ]; - } + public function getStats(): array + { + return [ + 'total_files' => count($this->files), + 'cached_mtimes' => count($this->fileMtimes), + 'base_path' => $this->basePath, + 'config' => $this->config, + 'manifest_entries' => count($this->manifest->all()), + ]; + } + + + /** + * 返回 Master 扫描产生的完整清单数据,供 Worker 轻量重建注解路由 + * @return array{string: array{mtime: int, classes: string[]}} + */ + public function getManifestClasses(): array + { + return $this->manifest->all(); + } public function reset(): void {