public static function registerAutoload($base_namespace, $base_path, $extension = '.php')
    {
        spl_autoload_register(function ($class_name) use ($base_namespace, $base_path, $extension) {
            $file_path = self::getFilePathForClassName(
                $class_name,
                $base_namespace,
                $base_path,
                $extension
            );
            if ($file_path) {
                /** @noinspection PhpIncludeInspection */
                require_once $file_path;
            }
        });
    }
public static function registerAutoload($base_namespace, $base_path, $extension = '.php')
    {
        spl_autoload_register(function ($class_name) use ($base_namespace, $base_path, $extension) {
            $file_path = self::getFilePathForClassName(
                $class_name,
                $base_namespace,
                $base_path,
                $extension
            );
            if ($file_path) {
                /** @noinspection PhpIncludeInspection */
                require_once $file_path;
            }
        });
    }
public static function registerAutoload ( $ base_namespace , $ base_path , $ extension = '.php' ) { spl_autoload_register ( function ( $ class_name ) use ( $ base_namespace , $ base_path , $ extension ) { $ file_path = self :: getFilePathForClassName ( $ class_name , $ base_namespace , $ base_path , $ extension ) ; if ( $ file_path ) { /** @noinspection PhpIncludeInspection */ require_once $ file_path ; } } ) ; }
For Autoload File
@param string $base_namespace such as sinri\enoch
@param string $base_path /code/sinri/enoch
@param string $extension
For Autoload File