ソースを参照

allow auto_loader to search in traits directories (#7005)

Co-authored-by: Tim Fry <[email protected]>
frytimo 1 年間 前
コミット
47972b2137
1 ファイル変更2 行追加0 行削除
  1. 2 0
      resources/classes/auto_loader.php

+ 2 - 0
resources/classes/auto_loader.php

@@ -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);