This commit is contained in:
2021-02-22 18:31:25 +08:00
parent 33c0454b49
commit 1549f02aea
2 changed files with 2 additions and 1 deletions
-1
View File
@@ -61,7 +61,6 @@ class Annotation extends Component
*/ */
public function readControllers(string $path, string $namespace, string $alias = 'root'): static public function readControllers(string $path, string $namespace, string $alias = 'root'): static
{ {
$this->debug('scan dir ' . $path . ' ing...');
return $this->scanDir(glob($path . '*'), $namespace, $alias); return $this->scanDir(glob($path . '*'), $namespace, $alias);
} }
+2
View File
@@ -133,6 +133,8 @@ class Application extends BaseApplication
*/ */
public function scan_system_annotation() public function scan_system_annotation()
{ {
$this->debug('scan system files...');
$annotation = Snowflake::app()->getAttributes(); $annotation = Snowflake::app()->getAttributes();
$annotation->readControllers(__DIR__ . '/../Console/', 'Console', 'system'); $annotation->readControllers(__DIR__ . '/../Console/', 'Console', 'system');
$annotation->readControllers(__DIR__ . '/../Database/', 'Database', 'system'); $annotation->readControllers(__DIR__ . '/../Database/', 'Database', 'system');