47 $lepton_path = dirname(__DIR__, 2);
49 $terms = explode(
"_", $aClassName);
51 if ($terms[0] ===
'LEPTON')
54 $path = $lepton_path.
"/framework/classes/".strtolower($aClassName).
".php";
55 if (file_exists($path))
64 $aMainFolders = [
"modules",
"templates"];
67 $aNTest = explode(
"\\", $aClassName);
68 if (count($aNTest) > 1)
70 $sPartOne = array_shift($aNTest);
71 $sSubPart = implode(
"/", $aNTest);
72 foreach ($aMainFolders as $sMainDir)
74 $path = $lepton_path.
"/".$sMainDir.
"/".$sPartOne.
"/classes/".$sSubPart.
".php";
76 if (file_exists($path))
83 $path = $lepton_path.
"/".$sMainDir.
"/".$sPartOne.
"/".$sSubPart.
".php";
84 if (file_exists($path))
94 $aMainFolders = [
"modules",
"templates"];
96 foreach ($aMainFolders as $sMainDir)
98 $path = $lepton_path.
"/".$sMainDir.
"/".$aClassName.
"/classes/".$aClassName.
".php";
100 if (file_exists($path))
108 $look_up = $terms[0];
110 for ($i = 0; $i < $n; $i++)
112 $temp_dir = $look_up . ($i > 0 ?
"_" . $terms[$i] :
"");
114 $path = $lepton_path.
"/".$sMainDir.
"/".$temp_dir.
"/classes/".$aClassName.
".php";
115 if (file_exists($path))
122 $temp_dir = $look_up.
"-".$terms[$i];
123 $path = $lepton_path.
"/".$sMainDir.
"/".$temp_dir.
"/classes/".$aClassName.
".php";
124 if (file_exists($path))
131 $look_up = $temp_dir;
137 $path = $lepton_path.
"/".$aClassName.
"/classes/".$aClassName.
".php";
138 if (file_exists($path))
143 $look_up = $terms[0];
145 $path = $lepton_path.
"/".$look_up.
"/classes/".$aClassName.
".php";
146 if (file_exists($path))