This commit is contained in:
2021-08-05 15:55:27 +08:00
parent a9e172b975
commit 6b9ef31df8
10 changed files with 95 additions and 70 deletions
+3 -4
View File
@@ -169,7 +169,6 @@ class Annotation extends Component
/**
* @param object $class
* @throws ReflectionException
* @throws NotFindClassException
*/
public function injectProperty(object $class)
{
@@ -186,19 +185,19 @@ class Annotation extends Component
*/
public function read(string $path, string $namespace = 'App', string $alias = 'root'): void
{
$this->_loader->_scanDir(new DirectoryIterator($path), $namespace);
}
/**
* @param string $dir
* @param array $exclude
* @return array
* @throws Exception
*/
public function runtime(string $dir): array
public function runtime(string $dir, array $exclude = []): array
{
return $this->_loader->loadByDirectory($dir);
return $this->_loader->loadByDirectory($dir, $exclude);
}