File modules/autoload.php
Last commit: Sat Feb 22 01:58:20 2020 +0100 Jan Dankert New: Autoloading of classes in all modules.
1 <?php 2 // Enable class autoloading for all classes in all modules 3 4 spl_autoload_register( 5 6 /** 7 * Loads classes from modules. 8 * 9 * The PHP default loader is unusable, because it will always use lowercase file names. 10 * 11 * @param $className Class name 12 * @return void 13 */ 14 function ($className) { 15 16 $c = __DIR__.DIRECTORY_SEPARATOR.str_replace( "\\", DIRECTORY_SEPARATOR, $className).'.class.php'; 17 18 if ( is_file($c) ) 19 require($c); 20 } 21 );
Downloadmodules/autoload.php
History Sat, 22 Feb 2020 01:58:20 +0100 Jan Dankert New: Autoloading of classes in all modules.