File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,13 @@ class Autoloader
13
13
*/
14
14
public function __construct ()
15
15
{
16
- spl_autoload_register (array ($ this , '__autoload ' ));
17
- }
18
-
19
- /**
20
- * @param string $class
21
- */
22
- private function __autoload ($ class )
23
- {
24
- $ class = str_replace ('\\' , '/ ' , $ class ); // revert path for old PHP on Linux
25
- $ dir = str_replace ('\\' , '/ ' , __DIR__ );
26
- if (file_exists ($ dir . '/ ' . $ class . '.php ' )) {
27
- /** @noinspection PhpIncludeInspection */
28
- require_once $ dir . '/ ' . $ class . '.php ' ;
29
- }
16
+ spl_autoload_register (function ($ class ) {
17
+ $ class = str_replace ('\\' , '/ ' , $ class ); // revert path for old PHP on Linux
18
+ $ dir = str_replace ('\\' , '/ ' , __DIR__ );
19
+ if (file_exists ($ dir . '/ ' . $ class . '.php ' )) {
20
+ /** @noinspection PhpIncludeInspection */
21
+ require_once $ dir . '/ ' . $ class . '.php ' ;
22
+ }
23
+ });
30
24
}
31
25
}
You can’t perform that action at this time.
0 commit comments