allow auto_loader to search in traits directories (#7005)

Co-authored-by: Tim Fry <tim@fusionpbx.com>
This commit is contained in:
frytimo 2024-06-11 13:17:02 -03:00 committed by GitHub
parent 9e2ab9b8c3
commit 5fda9b2dda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -62,8 +62,10 @@ class auto_loader {
//build the search path array
$search_path[] = glob($project_path . "/resources/classes/".$class_name.".php");
$search_path[] = glob($project_path . "/resources/interfaces/".$class_name.".php");
$search_path[] = glob($project_path . "/resources/traits/".$class_name.".php");
$search_path[] = glob($project_path . "/*/*/resources/classes/".$class_name.".php");
$search_path[] = glob($project_path . "/*/*/resources/interfaces/".$class_name.".php");
$search_path[] = glob($project_path . "/*/*/resources/traits/".$class_name.".php");
//find the path
$path = self::autoload_search($search_path);