modify
This commit is contained in:
@@ -171,7 +171,7 @@ class Loader extends BaseObject
|
|||||||
* @param string|array $outPath
|
* @param string|array $outPath
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function loadByDirectory(string $path, string|array $outPath = '')
|
public function loadByDirectory(string $path)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$path = '/' . trim($path, '/');
|
$path = '/' . trim($path, '/');
|
||||||
@@ -179,10 +179,9 @@ class Loader extends BaseObject
|
|||||||
$paths = [];
|
$paths = [];
|
||||||
foreach (static::$_directory as $key => $_path) {
|
foreach (static::$_directory as $key => $_path) {
|
||||||
$key = '/' . trim($key, '/');
|
$key = '/' . trim($key, '/');
|
||||||
if (!str_starts_with($key, $path) || in_array($key, $outPath)) {
|
if (!str_starts_with($key, $path)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($_path as $item) {
|
foreach ($_path as $item) {
|
||||||
$paths[] = $item;
|
$paths[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user