public static function driversIn($path)
    {
        if (! is_dir($path)) {
            return [];
        }

        $drivers = [];

        $dir = new RecursiveDirectoryIterator($path);
        $iterator = new RecursiveIteratorIterator($dir);
        $regex = new RegexIterator($iterator, '/^.+ValetDriver\.php$/i', RecursiveRegexIterator::GET_MATCH);

        foreach ($regex as $file) {
            require_once $file[0];

            $drivers[] = basename($file[0], '.php');
        }

        return $drivers;
    }
public static function driversIn($path)
    {
        if (! is_dir($path)) {
            return [];
        }

        $drivers = [];

        $dir = new RecursiveDirectoryIterator($path);
        $iterator = new RecursiveIteratorIterator($dir);
        $regex = new RegexIterator($iterator, '/^.+ValetDriver\.php$/i', RecursiveRegexIterator::GET_MATCH);

        foreach ($regex as $file) {
            require_once $file[0];

            $drivers[] = basename($file[0], '.php');
        }

        return $drivers;
    }
public static function driversIn ( $ path ) { if ( ! is_dir ( $ path ) ) { return [ ] ; } $ drivers = [ ] ; $ dir = new RecursiveDirectoryIterator ( $ path ) ; $ iterator = new RecursiveIteratorIterator ( $ dir ) ; $ regex = new RegexIterator ( $ iterator , '/^.+ValetDriver\.php$/i' , RecursiveRegexIterator :: GET_MATCH ) ; foreach ( $ regex as $ file ) { require_once $ file [ 0 ] ; $ drivers [ ] = basename ( $ file [ 0 ] , '.php' ) ; } return $ drivers ; }
Get all of the driver classes in a given path.

@param  string  $path
@return array
Get all of the driver classes in a given path .