public static function getIncludes($func)
    {
        $loader = new static();
        call_user_func($func, $loader);
        $loader->unregister();

        $config = new Config();
        foreach ($loader->getFilenames() as $file) {
            $config->addFile($file);
        }

        return $config;
    }
public static function getIncludes($func)
    {
        $loader = new static();
        call_user_func($func, $loader);
        $loader->unregister();

        $config = new Config();
        foreach ($loader->getFilenames() as $file) {
            $config->addFile($file);
        }

        return $config;
    }
public static function getIncludes ( $ func ) { $ loader = new static ( ) ; call_user_func ( $ func , $ loader ) ; $ loader -> unregister ( ) ; $ config = new Config ( ) ; foreach ( $ loader -> getFilenames ( ) as $ file ) { $ config -> addFile ( $ file ) ; } return $ config ; }
Wrap a block of code in the autoloader and get a list of loaded classes.

@param callable $func

@return \ClassPreloader\Config
Wrap a block of code in the autoloader and get a list of loaded classes .